-
Notifications
You must be signed in to change notification settings - Fork 362
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
df.convert_dtypes()
raising new error in Pandas 1.2.0
#247
Comments
In Pandas 1.2.0, a new data type Currently, when we run Currently, Altair has an open issue for a similar issue with a We can either sanitize the data ourselves before we send it to Altair, or we'll have to wait for a patch from likely Altair. |
Thanks for looking into this @westernguy2! Let's sanitize the data ourselves before sending it to Altair by converting the Could we also check that this |
The fix inside df = pd.read_csv("https://raw.githubusercontent.com/lux-org/lux-datasets/master/data/employee.csv")
df["%WorkingYearsAtCompany"]=df["YearsAtCompany"]/df["TotalWorkingYears"]
import traceback
import warnings
import sys
def warn_with_traceback(message, category, filename, lineno, file=None, line=None):
log = file if hasattr(file,'write') else sys.stderr
traceback.print_stack(file=log)
log.write(warnings.formatwarning(message, category, filename, lineno, line))
warnings.showwarning = warn_with_traceback
from lux.vis.Vis import Vis
Vis(["%WorkingYearsAtCompany","Age"],df) |
The import pandas.core.nanops as nanops
x = df["col_13"]
rng = (nanops.nanmin(x), nanops.nanmax(x))
nanops.nanmin(x) |
This issue is resolved now, thanks @westernguy2! |
After updating to Pandas 1.2.0, the below test in
test_pandas
is now failingIt raises
TypeError: data type not understood
when thecdf
is displayed with_repr_html_
.This test works in Pandas 1.1 but fails in Pandas 1.2 .
In the documentation for
convert_dtypes
, we see:This new change could be potentially causing the bug.
The text was updated successfully, but these errors were encountered: