Skip to content

Commit 31027f2

Browse files
DOC: conform to PEP-8 standards
1 parent a71cea3 commit 31027f2

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

doc/source/io.rst

+15-5
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,10 @@ If ``skip_blank_lines=False``, then ``read_csv`` will not ignore blank lines:
691691
'A,B,C\n'
692692
'1,2,3')
693693
pd.read_csv(StringIO(data), comment='#', header=1)
694-
data = 'A,B,C\n#comment\na,b,c\n1,2,3'
694+
data = ('A,B,C\n'
695+
'#comment\n'
696+
'a,b,c\n'
697+
'1,2,3')
695698
pd.read_csv(StringIO(data), comment='#', skiprows=2)
696699
697700
If both ``header`` and ``skiprows`` are specified, ``header`` will be
@@ -1225,7 +1228,9 @@ options as follows:
12251228

12261229
.. ipython:: python
12271230
1228-
data = 'a,b,c\n1,Yes,2\n3,No,4'
1231+
data = ('a,b,c\n
1232+
'1,Yes,2\n'
1233+
'3,No,4')
12291234
print(data)
12301235
pd.read_csv(StringIO(data))
12311236
pd.read_csv(StringIO(data), true_values=['Yes'], false_values=['No'])
@@ -1242,11 +1247,17 @@ too many fields will raise an error by default:
12421247
.. ipython:: python
12431248
:suppress:
12441249
1245-
data = 'a,b,c\n1,2,3\n4,5,6,7\n8,9,10'
1250+
data = ('a,b,c\n'
1251+
'1,2,3\n'
1252+
'4,5,6,7\n'
1253+
'8,9,10')
12461254
12471255
.. code-block:: ipython
12481256
1249-
In [27]: data = 'a,b,c\n1,2,3\n4,5,6,7\n8,9,10'
1257+
In [27]: data = ('a,b,c\n'
1258+
'1,2,3\n'
1259+
'4,5,6,7\n'
1260+
'8,9,10')
12501261
12511262
In [28]: pd.read_csv(StringIO(data))
12521263
---------------------------------------------------------------------------
@@ -2237,7 +2248,6 @@ A few notes on the generated table schema:
22372248

22382249
.. ipython:: python
22392250
2240-
22412251
from pandas.io.json import build_table_schema
22422252
s = pd.Series(pd.date_range('2016', periods=4))
22432253
build_table_schema(s)

0 commit comments

Comments
 (0)