Skip to content

DOC: avoid warnings ipython 'Code input with no code' #24238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/source/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ Finally, as a small note on performance, because the ``take`` method handles
a narrower range of inputs, it can offer performance that is a good deal
faster than fancy indexing.

.. ipython::
.. ipython:: python

arr = np.random.randn(10000, 5)
indexer = np.arange(10000)
Expand Down
3 changes: 0 additions & 3 deletions doc/source/reshaping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,6 @@ with the original ``DataFrame``:
dummies = pd.get_dummies(df['key'], prefix='key')
dummies


df[['data1']].join(dummies)

This function is often used along with discretization functions like ``cut``:
Expand All @@ -585,10 +584,8 @@ This function is often used along with discretization functions like ``cut``:
values = np.random.randn(10)
values


bins = [0, 0.2, 0.4, 0.6, 0.8, 1]


pd.get_dummies(pd.cut(values, bins))

See also :func:`Series.str.get_dummies <pandas.Series.str.get_dummies>`.
Expand Down
2 changes: 0 additions & 2 deletions doc/source/whatsnew/v0.17.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,6 @@ New Behavior:
In [3]: pd.to_datetime(['2009-07-31', 'asd'])
ValueError: Unknown string format

.. ipython:: python

Of course you can coerce this as well.

.. ipython:: python
Expand Down
3 changes: 0 additions & 3 deletions doc/source/whatsnew/v0.24.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,13 @@ See the :ref:`Merge, join, and concatenate
('K1', 'X2')],
names=['key', 'X'])


left = pd.DataFrame({'A': ['A0', 'A1', 'A2'],
'B': ['B0', 'B1', 'B2']}, index=index_left)


index_right = pd.MultiIndex.from_tuples([('K0', 'Y0'), ('K1', 'Y1'),
('K2', 'Y2'), ('K2', 'Y3')],
names=['key', 'Y'])


right = pd.DataFrame({'C': ['C0', 'C1', 'C2', 'C3'],
'D': ['D0', 'D1', 'D2', 'D3']}, index=index_right)

Expand Down