Skip to content

CLN: Format doc code blocks #36700

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 6 commits into from
Sep 29, 2020
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
3 changes: 2 additions & 1 deletion doc/source/development/code_style.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,6 @@ Reading from a url
.. code-block:: python

from pandas.io.common import urlopen
with urlopen('http://www.google.com') as url:

with urlopen("http://www.google.com") as url:
raw_text = url.read()
12 changes: 7 additions & 5 deletions doc/source/development/developer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ descriptor format for these as is follows:
.. code-block:: python

index = pd.RangeIndex(0, 10, 2)
{'kind': 'range',
'name': index.name,
'start': index.start,
'stop': index.stop,
'step': index.step}
{
"kind": "range",
"name": index.name,
"start": index.start,
"stop": index.stop,
"step": index.step,
}

Other index types must be serialized as data columns along with the other
DataFrame columns. The metadata for these is a string indicating the name of
Expand Down
5 changes: 3 additions & 2 deletions doc/source/development/internals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ integer **codes** (until version 0.24 named *labels*), and the level **names**:

.. ipython:: python

index = pd.MultiIndex.from_product([range(3), ['one', 'two']],
names=['first', 'second'])
index = pd.MultiIndex.from_product(
[range(3), ["one", "two"]], names=["first", "second"]
)
index
index.levels
index.codes
Expand Down
Loading