-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Enable read_csv to interpret "Infinity", "+Infinity" and "-Infinity" as floating point values #10065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
We're reading CSVs produced by Java, which stringifies infinite values as "Infinity" and "-Infinity". Am I be looking in the right place if I'm poking around in maybe_convert_numeric(). |
Here is where it would need to be changed: https://github.com/pydata/pandas/blob/master/pandas/parser.pyx#L1474 I think you might just be able to short-circuit with a |
The strings "Infinity", "+Infinity" and "-Infinity" are commonly used to represent infinite floating point values. It would be great for pandas pd.read_csv to correctly interpret these strings as infinite floating point values or to take a parameter "inf_values" analogous to "na_values" that would allow the caller to specify what they require.
The text was updated successfully, but these errors were encountered: