Skip to content

Commit bb0276d

Browse files
committed
removing additional override of built-in parameter 'columns' with 'column_schema'
1 parent 95f869b commit bb0276d

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

doc/source/getting_started/comparison/comparison_with_r.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ with a combination of the ``iloc`` indexer attribute and ``numpy.r_``.
133133
134134
named = list("abcdefg")
135135
n = 30
136-
columns = named + np.arange(len(named), n).tolist()
137-
df = pd.DataFrame(np.random.randn(n, n), columns=columns)
136+
column_schema = named + np.arange(len(named), n).tolist()
137+
df = pd.DataFrame(np.random.randn(n, n), columns=column_schema)
138138
139139
df.iloc[:, np.r_[:10, 24:30]]
140140

doc/source/user_guide/categorical.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,12 +626,12 @@ even if some categories are not present in the data:
626626

627627
.. ipython:: python
628628
629-
columns = pd.Categorical(
629+
column_schema = pd.Categorical(
630630
["One", "One", "Two"], categories=["One", "Two", "Three"], ordered=True
631631
)
632632
df = pd.DataFrame(
633633
data=[[1, 2, 3], [4, 5, 6]],
634-
columns=pd.MultiIndex.from_arrays([["A", "B", "B"], columns]),
634+
columns=pd.MultiIndex.from_arrays([["A", "B", "B"], column_schema]),
635635
)
636636
df.groupby(axis=1, level=1).sum()
637637

doc/source/user_guide/cookbook.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,9 +1171,9 @@ Option 2: read column names and then data
11711171
.. ipython:: python
11721172
11731173
pd.read_csv(StringIO(data), sep=";", header=10, nrows=10).columns
1174-
columns = pd.read_csv(StringIO(data), sep=";", header=10, nrows=10).columns
1174+
column_schema = pd.read_csv(StringIO(data), sep=";", header=10, nrows=10).columns
11751175
pd.read_csv(
1176-
StringIO(data), sep=";", index_col=0, header=12, parse_dates=True, names=columns
1176+
StringIO(data), sep=";", index_col=0, header=12, parse_dates=True, names=column_schema
11771177
)
11781178
11791179

doc/source/user_guide/indexing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,8 +1581,8 @@ The name, if set, will be shown in the console display:
15811581
.. ipython:: python
15821582
15831583
index = pd.Index(list(range(5)), name='rows')
1584-
columns = pd.Index(['A', 'B', 'C'], name='cols')
1585-
df = pd.DataFrame(np.random.randn(5, 3), index=index, columns=columns)
1584+
column_schema = pd.Index(['A', 'B', 'C'], name='cols')
1585+
df = pd.DataFrame(np.random.randn(5, 3), index=index, columns=column_schema)
15861586
df
15871587
df['A']
15881588

doc/source/user_guide/reshaping.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ processed individually.
179179

180180
.. ipython:: python
181181
182-
columns = pd.MultiIndex.from_tuples(
182+
column_schema = pd.MultiIndex.from_tuples(
183183
[
184184
("A", "cat", "long"),
185185
("B", "cat", "long"),
@@ -188,7 +188,7 @@ processed individually.
188188
],
189189
names=["exp", "animal", "hair_length"],
190190
)
191-
df = pd.DataFrame(np.random.randn(4, 4), columns=columns)
191+
df = pd.DataFrame(np.random.randn(4, 4), columns=column_schema)
192192
df
193193
194194
df.stack(level=["animal", "hair_length"])
@@ -212,7 +212,7 @@ calling :meth:`~DataFrame.sort_index`, of course). Here is a more complex exampl
212212

213213
.. ipython:: python
214214
215-
columns = pd.MultiIndex.from_tuples(
215+
column_schema = pd.MultiIndex.from_tuples(
216216
[
217217
("A", "cat"),
218218
("B", "dog"),
@@ -224,7 +224,7 @@ calling :meth:`~DataFrame.sort_index`, of course). Here is a more complex exampl
224224
index = pd.MultiIndex.from_product(
225225
[("bar", "baz", "foo", "qux"), ("one", "two")], names=["first", "second"]
226226
)
227-
df = pd.DataFrame(np.random.randn(8, 4), index=index, columns=columns)
227+
df = pd.DataFrame(np.random.randn(8, 4), index=index, columns=column_schema)
228228
df2 = df.iloc[[0, 1, 2, 4, 5, 7]]
229229
df2
230230

doc/source/user_guide/scale.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ Option 1 loads in all the data and then filters to what we need.
7373

7474
.. ipython:: python
7575
76-
columns = ["id_0", "name_0", "x_0", "y_0"]
76+
column_schema = ["id_0", "name_0", "x_0", "y_0"]
7777
78-
pd.read_parquet("timeseries_wide.parquet")[columns]
78+
pd.read_parquet("timeseries_wide.parquet")[column_schema]
7979
8080
Option 2 only loads the columns we request.
8181

8282
.. ipython:: python
8383
84-
pd.read_parquet("timeseries_wide.parquet", columns=columns)
84+
pd.read_parquet("timeseries_wide.parquet", columns=column_schema)
8585
8686
.. ipython:: python
8787
:suppress:

0 commit comments

Comments
 (0)