Skip to content

Commit 4b05055

Browse files
chris-b1jreback
authored andcommitted
DOC: low_memory in read_csv
closes #5888, xref #12686 Author: Chris <cbartak@gmail.com> Closes #13293 from chris-b1/low-memory-doc and squashes the following commits: daf9bca [Chris] DOC: low_memory in read_csv
1 parent 40b4bb4 commit 4b05055

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

doc/source/io.rst

+7
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,13 @@ skipfooter : int, default ``0``
169169
Number of lines at bottom of file to skip (unsupported with engine='c').
170170
nrows : int, default ``None``
171171
Number of rows of file to read. Useful for reading pieces of large files.
172+
low_memory : boolean, default ``True``
173+
Internally process the file in chunks, resulting in lower memory use
174+
while parsing, but possibly mixed type inference. To ensure no mixed
175+
types either set ``False``, or specify the type with the ``dtype`` parameter.
176+
Note that the entire file is read into a single DataFrame regardless,
177+
use the ``chunksize`` or ``iterator`` parameter to return the data in chunks.
178+
(Only valid with C parser)
172179

173180
NA and Missing Data Handling
174181
++++++++++++++++++++++++++++

pandas/io/parsers.py

+7
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,13 @@
220220
warn_bad_lines : boolean, default True
221221
If error_bad_lines is False, and warn_bad_lines is True, a warning for each
222222
"bad line" will be output. (Only valid with C parser).
223+
low_memory : boolean, default True
224+
Internally process the file in chunks, resulting in lower memory use
225+
while parsing, but possibly mixed type inference. To ensure no mixed
226+
types either set False, or specify the type with the `dtype` parameter.
227+
Note that the entire file is read into a single DataFrame regardless,
228+
use the `chunksize` or `iterator` parameter to return the data in chunks.
229+
(Only valid with C parser)
223230
224231
Returns
225232
-------

pandas/tools/tests/test_merge.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1134,8 +1134,8 @@ def test_concat_NaT_series(self):
11341134
tm.assert_series_equal(result, expected)
11351135

11361136
def test_concat_tz_frame(self):
1137-
df2 = DataFrame(dict(A=Timestamp('20130102', tz='US/Eastern'),
1138-
B=Timestamp('20130603', tz='CET')),
1137+
df2 = DataFrame(dict(A=pd.Timestamp('20130102', tz='US/Eastern'),
1138+
B=pd.Timestamp('20130603', tz='CET')),
11391139
index=range(5))
11401140

11411141
# concat

0 commit comments

Comments
 (0)