<jupyter_start><jupyter_text>Creating Dask Dataframes  `read_csv` function<jupyter_code>import dask.dataframe as df<jupyter_output><empty_output><jupyter_text>Dask Dataframe API is similar to Pandas API<jupyter_code>user_data_single = df.read_csv('multiple_csvs/gdp_part_0.csv')
user_data_single.npartitions
len(user_data_single)
user_data_single.head()<jupyter_output><empty_output><jupyter_text>You can specify a glob pattern to load multiple files<jupyter_code>user_data = df.read_csv('multiple_csvs/gdp_part_*.csv')
len(user_data)<jupyter_output><empty_output><jupyter_text>Or even pass a list of files<jupyter_code>import os

file_list = ['gdp_part_' + str(part) + '.csv'
             for part in range(0, 10)]
complete_path = [os.path.join('multiple_csvs', f_name) 
                for f_name in file_list]

print("File list is {}".format(complete_path))

user_df = df.read_csv(complete_path)
user_df.head()
n = 4
user_df = df.read_csv(complete_path, usecols=[i for i in range(1, n)])
user_df.head()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11400966183574879, 'fraction_numerical': 0.005797101449275362, 'mean_word_length': 6.908396946564886, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '88012', 'license': 'MIT', 'n_tokens_mistral': 400, 'n_tokens_neox': 393, 'n_words': 71, 'path': 'Section 4/Creating Dask Dataframes.ipynb', 'repo_name': 'akashmavle5/-Scalable-Data-Analysis-in-Python-with-Dask', 'size': '1035'}