We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98fb53c commit ed0b679Copy full SHA for ed0b679
pandas/tests/series/test_constructors.py
@@ -137,6 +137,14 @@ def test_constructor_no_data_index_order(self):
137
result = pd.Series(index=['b', 'a', 'c'])
138
assert result.index.tolist() == ['b', 'a', 'c']
139
140
+ def test_constructor_no_data_string_type(self):
141
+ result = pd.Series(index=[1], dtype=str)
142
+ assert result.isna().all()
143
+
144
+ def test_constructor_single_element_string_type(self):
145
+ result = pd.Series(13, index=[1], dtype=str)
146
+ assert result.values.tolist() == ['13']
147
148
def test_constructor_dtype_str_na_values(self, string_dtype):
149
# https://github.com/pandas-dev/pandas/issues/21083
150
ser = Series(['x', None], dtype=string_dtype)
0 commit comments