-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
DataFrame.insert should accept np.float32 #1059
Comments
Possibly. I'd like to see a more complete example from @tblum before we address this. Would be curious to know if |
import numpy as np
import pandas as pd
df = pd.DataFrame({"A": [1, 2, 3]})
df.insert(3, "A", value=np.float32(23.3))
df.insert(3, "A", value=np.float64(23.3)) Both give out the same error:
|
I think if we add PR with tests welcome. |
Describe the bug
Calling DataFrame.insert with a np.float32 will fail with the following error:
error: Argument 3 to "insert" of "DataFrame" has incompatible type "floating[_32Bit]"; expected "str | bytes | date | datetime | timedelta | <7 more items> | complex | Sequence[Any] | ndarray[Any, Any] | Series[Any] | Index[Any] | None" [arg-type]
The text was updated successfully, but these errors were encountered: