Skip to content

Commit 5912ae7

Browse files
committed
suggested changes
1 parent a61b8cd commit 5912ae7

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

pandas/core/frame.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8569,20 +8569,21 @@ def isin(self, values) -> "DataFrame":
85698569

85708570
# ----------------------------------------------------------------------
85718571
# Add index and columns
8572-
index: "Index" = properties.AxisProperty(
8573-
axis=1, doc="The index (row labels) of the DataFrame."
8574-
)
8575-
columns: "Index" = properties.AxisProperty(
8576-
axis=0, doc="The column labels of the DataFrame."
8577-
)
85788572
_AXIS_ORDERS = ["index", "columns"]
85798573
_AXIS_NUMBERS = {"index": 0, "columns": 1}
85808574
_AXIS_NAMES = {0: "index", 1: "columns"}
85818575
_AXIS_REVERSED = True
85828576
_info_axis_number = 1
8583-
_info_axis_name = _AXIS_ORDERS[_info_axis_number]
8577+
_info_axis_name = "columns"
85848578
_AXIS_LEN = len(_AXIS_ORDERS)
85858579

8580+
index: "Index" = properties.AxisProperty(
8581+
axis=1, doc="The index (row labels) of the DataFrame."
8582+
)
8583+
columns: "Index" = properties.AxisProperty(
8584+
axis=0, doc="The column labels of the DataFrame."
8585+
)
8586+
85868587
# ----------------------------------------------------------------------
85878588
# Add plotting methods to DataFrame
85888589
plot = CachedAccessor("plot", pandas.plotting.PlotAccessor)

pandas/core/series.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4562,17 +4562,18 @@ def to_period(self, freq=None, copy=True) -> "Series":
45624562

45634563
# ----------------------------------------------------------------------
45644564
# Add index
4565-
index: "Index" = properties.AxisProperty(
4566-
axis=0, doc="The index (axis labels) of the Series."
4567-
)
4565+
_info_axis_number = 0
4566+
_info_axis_name = "index"
45684567
_AXIS_ORDERS = ["index"]
45694568
_AXIS_NUMBERS = {"index": 0}
45704569
_AXIS_NAMES = {0: "index"}
45714570
_AXIS_REVERSED = False
4572-
_info_axis_number = 0
4573-
_info_axis_name = _AXIS_ORDERS[_info_axis_number]
45744571
_AXIS_LEN = len(_AXIS_ORDERS)
45754572

4573+
index: "Index" = properties.AxisProperty(
4574+
axis=0, doc="The index (axis labels) of the Series."
4575+
)
4576+
45764577
# ----------------------------------------------------------------------
45774578
# Accessor Methods
45784579
# ----------------------------------------------------------------------

0 commit comments

Comments
 (0)