Loading tutorials
to_csv, to_excel, or to_parquet, decide which file you need. The three formats solve different problems. A wrong choice shows up later as lost dtypes, a file too big to open, or a colleague who cannot read your output.7 min readto_csv that decide what ends up in the file: the index, the header, the separator, missing values, and number and date formatting. It assumes you can create a DataFrame, know the basic dtype5 min readto_csv that decide how a file is stored on disk: compression, which changes its size, and encoding, which changes how text becomes bytes. It assumes you can already write a CSV with to_csv and control the index, header, and separator. It also assumes you know 5 min readto_csv and know the options from the previous chapters (index, sep, na_rep, float_format). It also assumes you know pandas dtypes such as int64, float64, datetime64, category, and the nullable Int64 and string types.5 min readDataFrame.to_excel for a single sheet. You should already know how to build a DataFrame and read its dtypes, and how to install packages with pip. You should also know the basics of to_csv from the earlier chapters. Writing several sheets and formatting come in the next two c5 min readpd.ExcelWriter, the object that lets you put several DataFrames into one .xlsx file. It assumes you can already write a single sheet with to_excel, have openpyxl installed, and know how to build and group a DataFrame.5 min readto_excel and ExcelWriter, and that openpyxl is installed. Here you will learn what Excel cannot hold, which engine writes your file, and how to apply light formatting without leaving pandas.6 min readto_csv in the earlier chapters. Here you write your first Parquet file, learn what6 min readto_parquet and have pyarrow installed (pip install pyarrow). It also assumes you know the pandas dtypes int64, float64, string, category, and datetime64. Here you will learn why a Parquet round trip returns the same dtypes that CSV 6 min readdf.to_parquet(...), and that you have pyarrow installed. It covers two things. The first is how to choose a compression codec. The second is how to split one large DataFrame into a directory of files with partition_cols, and how to 5 min readread_csv, you know the index, header, and mode arguments of to_csv from earlier chapters, and you have a working idea of what a DataFrame costs in memory. Here you will process a file that is too big to load at once and write the result piece by5 min read