This repository was archived by the owner on Apr 10, 2024. It is now read-only.
This repository was archived by the owner on Apr 10, 2024. It is now read-only.
Dtype strict mode #19
Open
Description
pandas dtype
coercion is useful in most cases, but there are situations to prohibit it to avoid unexpected values being included. The behavior should be switchable like:
s = pd.Series([1, 2, 3])
s[1] = 1.2
s
#0 1
#1 1
#2 3
# dtype: int64
s[1] = 'x'
s
#0 1
#1 x
#2 3
# dtype: object
s = pd.Series([1, 2, 3], cast=False)
s[1] = 'x'
TypeError...