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