Skip to content

Commit 01afc42

Browse files
DOC: avoid warnings ipython 'Code input with no code' (#24238)
1 parent c037128 commit 01afc42

File tree

4 files changed

+1
-9
lines changed

4 files changed

+1
-9
lines changed

doc/source/advanced.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ Finally, as a small note on performance, because the ``take`` method handles
694694
a narrower range of inputs, it can offer performance that is a good deal
695695
faster than fancy indexing.
696696

697-
.. ipython::
697+
.. ipython:: python
698698
699699
arr = np.random.randn(10000, 5)
700700
indexer = np.arange(10000)

doc/source/reshaping.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,6 @@ with the original ``DataFrame``:
575575
dummies = pd.get_dummies(df['key'], prefix='key')
576576
dummies
577577
578-
579578
df[['data1']].join(dummies)
580579
581580
This function is often used along with discretization functions like ``cut``:
@@ -585,10 +584,8 @@ This function is often used along with discretization functions like ``cut``:
585584
values = np.random.randn(10)
586585
values
587586
588-
589587
bins = [0, 0.2, 0.4, 0.6, 0.8, 1]
590588
591-
592589
pd.get_dummies(pd.cut(values, bins))
593590
594591
See also :func:`Series.str.get_dummies <pandas.Series.str.get_dummies>`.

doc/source/whatsnew/v0.17.0.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,6 @@ New Behavior:
627627
In [3]: pd.to_datetime(['2009-07-31', 'asd'])
628628
ValueError: Unknown string format
629629
630-
.. ipython:: python
631-
632630
Of course you can coerce this as well.
633631

634632
.. ipython:: python

doc/source/whatsnew/v0.24.0.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,16 +277,13 @@ See the :ref:`Merge, join, and concatenate
277277
('K1', 'X2')],
278278
names=['key', 'X'])
279279
280-
281280
left = pd.DataFrame({'A': ['A0', 'A1', 'A2'],
282281
'B': ['B0', 'B1', 'B2']}, index=index_left)
283282
284-
285283
index_right = pd.MultiIndex.from_tuples([('K0', 'Y0'), ('K1', 'Y1'),
286284
('K2', 'Y2'), ('K2', 'Y3')],
287285
names=['key', 'Y'])
288286
289-
290287
right = pd.DataFrame({'C': ['C0', 'C1', 'C2', 'C3'],
291288
'D': ['D0', 'D1', 'D2', 'D3']}, index=index_right)
292289

0 commit comments

Comments
 (0)