Skip to content

Commit 96aee4f

Browse files
committed
suggested changes
1 parent a61b8cd commit 96aee4f

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,19 +8569,20 @@ def isin(self, values) -> "DataFrame":
85698569

85708570
# ----------------------------------------------------------------------
85718571
# Add index and columns
8572+
_AXIS_ORDERS = ["index", "columns"]
8573+
_AXIS_NUMBERS = {"index": 0, "columns": 1}
8574+
_AXIS_NAMES = {0: "index", 1: "columns"}
8575+
_AXIS_REVERSED = True
8576+
_AXIS_LEN = len(_AXIS_ORDERS)
8577+
_info_axis_number = 1
8578+
_info_axis_name = "columns"
8579+
85728580
index: "Index" = properties.AxisProperty(
85738581
axis=1, doc="The index (row labels) of the DataFrame."
85748582
)
85758583
columns: "Index" = properties.AxisProperty(
85768584
axis=0, doc="The column labels of the DataFrame."
85778585
)
8578-
_AXIS_ORDERS = ["index", "columns"]
8579-
_AXIS_NUMBERS = {"index": 0, "columns": 1}
8580-
_AXIS_NAMES = {0: "index", 1: "columns"}
8581-
_AXIS_REVERSED = True
8582-
_info_axis_number = 1
8583-
_info_axis_name = _AXIS_ORDERS[_info_axis_number]
8584-
_AXIS_LEN = len(_AXIS_ORDERS)
85858586

85868587
# ----------------------------------------------------------------------
85878588
# Add plotting methods to DataFrame

pandas/core/series.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4562,16 +4562,17 @@ 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-
)
45684565
_AXIS_ORDERS = ["index"]
45694566
_AXIS_NUMBERS = {"index": 0}
45704567
_AXIS_NAMES = {0: "index"}
45714568
_AXIS_REVERSED = False
4572-
_info_axis_number = 0
4573-
_info_axis_name = _AXIS_ORDERS[_info_axis_number]
45744569
_AXIS_LEN = len(_AXIS_ORDERS)
4570+
_info_axis_number = 0
4571+
_info_axis_name = "index"
4572+
4573+
index: "Index" = properties.AxisProperty(
4574+
axis=0, doc="The index (axis labels) of the Series."
4575+
)
45754576

45764577
# ----------------------------------------------------------------------
45774578
# Accessor Methods

0 commit comments

Comments
 (0)