Skip to content

Commit 10c51ba

Browse files
authored
DOC: Fix doc example in read_stata (#51114)
* DOC: Fix doc example in read_stata * DOC: Fix doc example in read_stata
1 parent 6478e70 commit 10c51ba

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas/io/stata.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,17 @@
167167
--------
168168
169169
Creating a dummy stata for this example
170-
>>> df = pd.DataFrame({{'animal': ['falcon', 'parrot', 'falcon',
171-
... 'parrot'],
172-
... 'speed': [350, 18, 361, 15]}}) # doctest: +SKIP
170+
171+
>>> df = pd.DataFrame({{'animal': ['falcon', 'parrot', 'falcon', 'parrot'],
172+
... 'speed': [350, 18, 361, 15]}}) # doctest: +SKIP
173173
>>> df.to_stata('animals.dta') # doctest: +SKIP
174174
175175
Read a Stata dta file:
176176
177177
>>> df = pd.read_stata('animals.dta') # doctest: +SKIP
178178
179179
Read a Stata dta file in 10,000 line chunks:
180+
180181
>>> values = np.random.randint(0, 10, size=(20_000, 1), dtype="uint8") # doctest: +SKIP
181182
>>> df = pd.DataFrame(values, columns=["i"]) # doctest: +SKIP
182183
>>> df.to_stata('filename.dta') # doctest: +SKIP

0 commit comments

Comments
 (0)