Skip to content
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

ENH: Enable passing in dict to specify datatypes to DataFrame constructor #9133

Closed
artemyk opened this issue Dec 22, 2014 · 2 comments
Closed
Labels
API Design Dtype Conversions Unexpected or buggy dtype conversions

Comments

@artemyk
Copy link
Contributor

artemyk commented Dec 22, 2014

The following seems like very natural syntax to specify the dtypes of various columns passed into the DataFrame constructor:

df = pd.DataFrame({'a':[1,2,3], 'b':[2.5,3.5,6.7]}, dtype={'a':'int32','b':'float32'})

However, right now it raises an error. Perhaps something worth implementing? See also http://stackoverflow.com/questions/21197774/assign-pandas-dataframe-column-dtypes

@jreback
Copy link
Contributor

jreback commented Dec 22, 2014

this is covered by #4464 thanks

@jreback
Copy link
Contributor

jreback commented Dec 22, 2014

welcome a PR on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Dtype Conversions Unexpected or buggy dtype conversions
Projects
None yet
Development

No branches or pull requests

2 participants