@@ -11770,7 +11770,50 @@ def isin(self, values: Series | DataFrame | Sequence | Mapping) -> DataFrame:
11770
11770
_info_axis_name : Literal ["columns" ] = "columns"
11771
11771
11772
11772
index = properties .AxisProperty (
11773
- axis = 1 , doc = "The index (row labels) of the DataFrame."
11773
+ axis = 1 ,
11774
+ doc = """
11775
+ The index (row labels) of the DataFrame.
11776
+
11777
+ The index of a DataFrame is a series of labels that identify each row.
11778
+ The labels can be integers, strings, or any other hashable type. The index
11779
+ is used for label-based access and alignment, and can be accessed or
11780
+ modified using this attribute.
11781
+
11782
+ Returns
11783
+ -------
11784
+ pandas.Index
11785
+ The index labels of the DataFrame.
11786
+
11787
+ See Also
11788
+ --------
11789
+ DataFrame.columns : The column labels of the DataFrame.
11790
+ DataFrame.to_numpy : Convert the DataFrame to a NumPy array.
11791
+
11792
+ Examples
11793
+ --------
11794
+ >>> df = pd.DataFrame({'Name': ['Alice', 'Bob', 'Aritra'],
11795
+ ... 'Age': [25, 30, 35],
11796
+ ... 'Location': ['Seattle', 'New York', 'Kona']},
11797
+ ... index=([10, 20, 30]))
11798
+ >>> df.index
11799
+ Index([10, 20, 30], dtype='int64')
11800
+
11801
+ In this example, we create a DataFrame with 3 rows and 3 columns,
11802
+ including Name, Age, and Location information. We set the index labels to
11803
+ be the integers 10, 20, and 30. We then access the `index` attribute of the
11804
+ DataFrame, which returns an `Index` object containing the index labels.
11805
+
11806
+ >>> df.index = [100, 200, 300]
11807
+ >>> df
11808
+ Name Age Location
11809
+ 100 Alice 25 Seattle
11810
+ 200 Bob 30 New York
11811
+ 300 Aritra 35 Kona
11812
+
11813
+ In this example, we modify the index labels of the DataFrame by assigning
11814
+ a new list of labels to the `index` attribute. The DataFrame is then
11815
+ updated with the new labels, and the output shows the modified DataFrame.
11816
+ """ ,
11774
11817
)
11775
11818
columns = properties .AxisProperty (axis = 0 , doc = "The column labels of the DataFrame." )
11776
11819
0 commit comments