Loading tutorials
pip install pandas if you have not already.2 min readread_csv first turned text into a DataFrame.2 min readpd.read_csv on a well-formed file and know what a DataFrame is. Here you will load files that do not follow the default layout: a different separator, a missing or misplaced header, and a column that should become the index.2 min readread_csv with its default settings. Here you will limit what pandas loads, which saves memory and time before any cleaning starts.2 min readpd.read_csv and know what a DataFrame and a dtype are. It covers how pandas picks column types, where that goes wrong, and how to set types as the file loads.2 min readread_csv and read its arguments, as covered in the earlier chapters on loading CSV files and setting data types. Here you control which text becomes a missing value and how numbers written in other regional formats are read.2 min readread_csv with a StringIO source, know what a dtype is, and have read the chapter on missing values. By default, read_csv loads date columns as plain text (object or string dtype). Text dates cannot be sorted by time, subtracted, or grouped by month. Parsing2 min readread_csv, because read_excel takes many of the same arguments.2 min readpd.read_excel on a single file, that you have openpyxl installed for .xlsx files, and that you know what a DataFrame is. Here you learn how to choose which sheets of a workbook become DataFrames.2 min readpd.read_excel on a simple sheet and have an Excel engine such as openpyxl installed. Real workbooks often have a title block above the table, notes beside it, or a totals row below it. The arguments here let you load only the table.2 min readpandas.read_excel to load a sheet. It covers how pandas reads Excel files, which package it uses for each format, and the errors you see when that package is missing.3 min readpd.read_csv, you know what a DataFrame is, and you have pandas installed. It covers two failures that appear with files exported from other systems: text that cannot be decoded, and rows that do not match the header.2 min readread_csv with usecols and dtype, and that you know what a DataFrame is. Here you will process a file that is too big to load at once.2 min readread_csv and read_excel, set dtype, na_values and parse_dates, and read a DataFrame's info() output. The examples need pandas 2.0 or later.2 min read