@@ -75,10 +75,22 @@ class TestSeriesDropDuplicates:
75
75
params = ["int_" , "uint" , "float64" , "str_" , "timedelta64[h]" , "datetime64[D]" ]
76
76
)
77
77
def dtype (self , request ):
78
+ """
79
+ Fixture that provides different data types for testing.
80
+ The parameterized fixture returns various numpy data types including
81
+ integer, unsigned integer, float, string, timedelta, and datetime.
82
+ """
78
83
return request .param
79
84
80
85
@pytest .fixture
81
86
def cat_series_unused_category (self , dtype , ordered ):
87
+ """
88
+ Fixture that creates a Categorical Series with some unused categories.
89
+ This fixture creates a Categorical Series based on the given dtype and
90
+ ordered parameters. The input series contains some categories that are
91
+ not used in the actual data, allowing the testing of categorical
92
+ behavior with unused categories.
93
+ """
82
94
# Test case 1
83
95
cat_array = np .array ([1 , 2 , 3 , 4 , 5 ], dtype = np .dtype (dtype ))
84
96
@@ -141,7 +153,13 @@ def test_drop_duplicates_categorical_non_bool_keepfalse(
141
153
142
154
@pytest .fixture
143
155
def cat_series (self , dtype , ordered ):
144
- # no unused categories, unlike cat_series_unused_category
156
+ """
157
+ Fixture that creates a Categorical Series with no unused categories.
158
+ This fixture creates a Categorical Series based on the given dtype and
159
+ ordered parameters. The input series contains categories that are all
160
+ used in the actual data, allowing the testing of categorical behavior
161
+ without unused categories.
162
+ """
145
163
cat_array = np .array ([1 , 2 , 3 , 4 , 5 ], dtype = np .dtype (dtype ))
146
164
147
165
input2 = np .array ([1 , 2 , 3 , 5 , 3 , 2 , 4 ], dtype = np .dtype (dtype ))
0 commit comments