Skip to content

Commit 7f47d33

Browse files
DOC: Add example for read_csv with nullable dtype (#49995)
1 parent 2e3ffa6 commit 7f47d33

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/source/user_guide/io.rst

+11
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,17 @@ worth trying.
464464
465465
os.remove("foo.csv")
466466
467+
Setting ``use_nullable_dtypes=True`` will result in nullable dtypes for every column.
468+
469+
.. ipython:: python
470+
471+
data = """a,b,c,d,e,f,g,h,i,j
472+
1,2.5,True,a,,,,,12-31-2019,
473+
3,4.5,False,b,6,7.5,True,a,12-31-2019,
474+
"""
475+
476+
pd.read_csv(StringIO(data), use_nullable_dtypes=True, parse_dates=["i"])
477+
467478
.. _io.categorical:
468479

469480
Specifying categorical dtype

0 commit comments

Comments
 (0)