Skip to main content

__ Back to top

__ ` Ctrl ` \+ ` K `

[ ![pandas 2.2.1 documentation - Home](../_static/pandas.svg) ](../index.html)

Site Navigation

  * [ Getting started ](../getting_started/index.html)
  * [ User Guide ](index.html)
  * [ API reference ](../reference/index.html)
  * [ Development ](../development/index.html)
  * [ Release notes ](../whatsnew/index.html)

  * [ __ GitHub  ](https://github.com/pandas-dev/pandas "GitHub")
  * [ __ Twitter  ](https://twitter.com/pandas_dev "Twitter")
  * [ __ Mastodon  ](https://fosstodon.org/@pandas_dev "Mastodon")

Site Navigation

  * [ Getting started ](../getting_started/index.html)
  * [ User Guide ](index.html)
  * [ API reference ](../reference/index.html)
  * [ Development ](../development/index.html)
  * [ Release notes ](../whatsnew/index.html)

  * [ __ GitHub  ](https://github.com/pandas-dev/pandas "GitHub")
  * [ __ Twitter  ](https://twitter.com/pandas_dev "Twitter")
  * [ __ Mastodon  ](https://fosstodon.org/@pandas_dev "Mastodon")

  * [ 10 minutes to pandas ](10min.html)
  * [ Intro to data structures ](dsintro.html)
  * [ Essential basic functionality ](basics.html)
  * IO tools (text, CSV, HDF5, â¦) 
  * [ PyArrow Functionality ](pyarrow.html)
  * [ Indexing and selecting data ](indexing.html)
  * [ MultiIndex / advanced indexing ](advanced.html)
  * [ Copy-on-Write (CoW) ](copy_on_write.html)
  * [ Merge, join, concatenate and compare ](merging.html)
  * [ Reshaping and pivot tables ](reshaping.html)
  * [ Working with text data ](text.html)
  * [ Working with missing data ](missing_data.html)
  * [ Duplicate Labels ](duplicates.html)
  * [ Categorical data ](categorical.html)
  * [ Nullable integer data type ](integer_na.html)
  * [ Nullable Boolean data type ](boolean.html)
  * [ Chart visualization ](visualization.html)
  * [ Table Visualization ](style.html)
  * [ Group by: split-apply-combine ](groupby.html)
  * [ Windowing operations ](window.html)
  * [ Time series / date functionality ](timeseries.html)
  * [ Time deltas ](timedeltas.html)
  * [ Options and settings ](options.html)
  * [ Enhancing performance ](enhancingperf.html)
  * [ Scaling to large datasets ](scale.html)
  * [ Sparse data structures ](sparse.html)
  * [ Frequently Asked Questions (FAQ) ](gotchas.html)
  * [ Cookbook ](cookbook.html)

  * [ __ ](../index.html)
  * [ User Guide ](index.html)
  * IO tools... 

#  IO tools (text, CSV, HDF5, â¦)  #

The pandas I/O API is a set of top level ` reader  ` functions accessed like [
` pandas.read_csv()  ` ](../reference/api/pandas.read_csv.html#pandas.read_csv
"pandas.read_csv") that generally return a pandas object. The corresponding `
writer  ` functions are object methods that are accessed like [ `
DataFrame.to_csv()  `
](../reference/api/pandas.DataFrame.to_csv.html#pandas.DataFrame.to_csv
"pandas.DataFrame.to_csv") . Below is a table containing available ` readers
` and ` writers  ` .

Format Type  |  Data Description  |  Reader  |  Writer   
---|---|---|---  
text  |  [ CSV ](https://en.wikipedia.org/wiki/Comma-separated_values) |  read_csv  |  to_csv   
text  |  Fixed-Width Text File  |  read_fwf  |   
text  |  [ JSON ](https://www.json.org/) |  read_json  |  to_json   
text  |  [ HTML ](https://en.wikipedia.org/wiki/HTML) |  read_html  |  to_html   
text  |  [ LaTeX ](https://en.wikipedia.org/wiki/LaTeX) |  |  Styler.to_latex   
text  |  [ XML ](https://www.w3.org/standards/xml/core) |  read_xml  |  to_xml   
text  |  Local clipboard  |  read_clipboard  |  to_clipboard   
binary  |  [ MS Excel ](https://en.wikipedia.org/wiki/Microsoft_Excel) |  read_excel  |  to_excel   
binary  |  [ OpenDocument ](http://opendocumentformat.org) |  read_excel  |   
binary  |  [ HDF5 Format ](https://support.hdfgroup.org/HDF5/whatishdf5.html) |  read_hdf  |  to_hdf   
binary  |  [ Feather Format ](https://github.com/wesm/feather) |  read_feather  |  to_feather   
binary  |  [ Parquet Format ](https://parquet.apache.org/) |  read_parquet  |