We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df28514 commit 6b4c10eCopy full SHA for 6b4c10e
pandas/tests/series/methods/test_value_counts.py
@@ -213,11 +213,15 @@ def test_value_counts_bool_with_nan(self, ser, dropna, exp):
213
[
214
(
215
[1 + 1j, 1 + 1j, 1, 3j, 3j, 3j],
216
- Series([3, 2, 1], index=pd.Index([3j, 1 + 1j, 1])),
217
- )
+ Series([3, 2, 1], index=pd.Index([3j, 1 + 1j, 1], dtype=np.complex128)),
+ ),
218
+ (
219
+ [1 + 1j, 1 + 1j, 1, 3j, 3j, 3j],
220
+ Series([3, 2, 1], index=pd.Index([3j, 1 + 1j, 1], dtype=np.complex64)),
221
222
],
223
)
224
def test_value_counts_complex_numbers(self, input_array, expected):
225
# Complex Index dtype is cast to object
226
result = Series(input_array).value_counts()
- tm.assert_series_equal(result, expected, check_index_type=False)
227
+ tm.assert_series_equal(result, expected)
0 commit comments