Input/output#

Pickling#

read_pickle(filepath_or_buffer[, ...])

Load pickled pandas object (or any object) from file.

DataFrame.to_pickle(path[, compression, ...])

Pickle (serialize) object to file.

Flat file#

read_table()

Read general delimited file into DataFrame.

read_csv(path[, names, sep, index_col, ...])

Read a comma-separated values (csv) file into DataFrame.

DataFrame.to_csv(path[, sep, na_rep, ...])

Write object to a comma-separated values (csv) file.

read_fwf(filepath_or_buffer, *[, colspecs, ...])

Read a table of fixed-width formatted lines into DataFrame.

Clipboard#

read_clipboard([sep, dtype_backend])

Read text from clipboard and pass to read_csv().

DataFrame.to_clipboard([excel, sep])

Copy object to the system clipboard.

Excel#

read_excel()

Read an Excel file into a pandas DataFrame.

DataFrame.to_excel(excel_writer[, ...])

Write object to an Excel sheet.

JSON#

read_json()

Convert a JSON string to pandas object.

json_normalize(data[, record_path, meta, ...])

Normalize semi-structured JSON data into a flat table.

DataFrame.to_json([path_or_buf, orient, ...])

Convert the object to a JSON string.

HTML#

read_html(io, *[, match, flavor, header, ...])

Read HTML tables into a list of DataFrame objects.

DataFrame.to_html()

Render a DataFrame as an HTML table.

XML#

read_xml(path_or_buffer, *[, xpath, ...])

Read XML document into a DataFrame object.

DataFrame.to_xml([path_or_buffer, index, ...])

Render a DataFrame to an XML document.

Latex#

DataFrame.to_latex([buf, columns, header, ...])

Render object to a LaTeX tabular, longtable, or nested table.

HDFStore: PyTables (HDF5)#

read_hdf(path_or_buf[, key, mode, errors, ...])

Read from the store, close it if we opened it.

Warning

One can store a subclass of DataFrame or Series to HDF5, but the type of the subclass is lost upon storing.

Feather#

read_feather(path[, columns, use_threads, ...])

Load a feather-format object from the file path.

DataFrame.to_feather(path, **kwargs)

Write a DataFrame to the binary Feather format.

Parquet#

read_parquet(path[, engine, columns, ...])

Load a parquet object from the file path, returning a DataFrame.

DataFrame.to_parquet(path[, engine, ...])

Write a DataFrame to the binary parquet format.

ORC#

read_orc(path[, columns, dtype_backend, ...])

Load an ORC object from the file path, returning a DataFrame.

DataFrame.to_orc([path, engine, index, ...])

Write a DataFrame to the ORC format.

SAS#

read_sas()

Read SAS files stored as either XPORT or SAS7BDAT format files.

SPSS#

read_spss(path[, usecols, ...])

Load an SPSS file from the file path, returning a DataFrame.

SQL#

read_sql_table(table_name, con[, schema, ...])

Read SQL database table into a DataFrame.

read_sql_query(sql, con[, index_col, ...])

Read SQL query into a DataFrame.

read_sql(sql, con[, index_col, ...])

Read SQL query or database table into a DataFrame.

DataFrame.to_sql(name, con[, schema, ...])

Write records stored in a DataFrame to a SQL database.

Google BigQuery#

read_gbq(query[, project_id, index_col, ...])

Load data from Google BigQuery.

STATA#

read_stata(filepath_or_buffer, *[, ...])

Read Stata file into DataFrame.

DataFrame.to_stata(path, *[, convert_dates, ...])

Export DataFrame object to Stata dta format.