DataFrame constructor silently ignores dtype
keyword when values cannot be coerced · Issue #24435 · pandas-dev/pandas (original) (raw)
In [1]: import pandas as pd
In [2]: pd.DataFrame({'A': ['a', 'b']}, dtype=int) Out[2]: A 0 a 1 b
In [3]: pd.DataFrame({'A': ['a', 'b']}, dtype=int).dtypes Out[3]: A object dtype: object
I propose that we warn that that will raise in the future.