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.

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.