10.1 Introduction
The pandas I/O API is a set of top level reader
functions accessed like pd.read_csv()
that generally return a pandas
object.
- read_csv
- read_excel
- read_hdf
- read_sql
- read_json
- read_msgpack (experimental)
- read_html
- read_gbq (experimental)
- read_stata
- read_sas
- read_clipboard
- read_pickle
The corresponding writer
functions are object methods that are accessed like df.to_csv()
Here is an informal performance comparison for some of these IO methods.
Note
For examples that use the StringIO
class, make sure you import it
according to your Python version, i.e. from StringIO import StringIO
for
Python 2 and from io import StringIO
for Python 3.