pandas.errors.PossiblePrecisionLoss — pandas 3.0.0.dev0+2105.g29e01463a6 documentation (original) (raw)

exception pandas.errors.PossiblePrecisionLoss[source]#

Warning raised by to_stata on a column with a value outside or equal to int64.

When the column value is outside or equal to the int64 value the column is converted to a float64 dtype.

See also

DataFrame.to_stata

Export DataFrame object to Stata dta format.

Examples

df = pd.DataFrame({"s": pd.Series([1, 2**53], dtype=np.int64)}) df.to_stata("test")