Closed
Description
[in]
for cl in train.columns:
print cl, type(train.loc[0, cl])
print cl, type(train[cl][0])
break
[out]
record_ID <type 'numpy.float64'>
record_ID <type 'numpy.int64'>
Though I can solve it in many cases with train[cl].dtype
, which gives the correct output:
[out]
record_ID int64
But if we work with string data types the output will be object
instead of str
as data type.
Something shortstop by me or what happens?
Thank you.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
jreback commentedon Jan 6, 2016
pls show
train.info()
,train.head()
andpd.show_versions()
jorisvandenbossche commentedon Jan 6, 2016
A smaller reproducible example:
jreback commentedon Jan 6, 2016
dupe of #11617
grgsolymosi commentedon Jan 6, 2016
@jreback0
Why the "dupe" label, please?
@jorisvandenbossche 's example shows the same issue, doesn't it?
jreback commentedon Jan 6, 2016
dupe means duplicate. See the referenced issue which is the same. We get a fair number of duplicates here (no fault of the poster of course). So try to have a single issue.
If you look at the referenced issue and it IS not the same, pls let me know.
grgsolymosi commentedon Jan 6, 2016
@jreback thank you for the info and your efforts.
grgsolymosi commentedon Jan 6, 2016
@jreback
Just one more info as I saw, that the other issue was on other system config:
My system:
Python 2.7.11
Ubuntu 14.04 LTS
jreback commentedon Jan 6, 2016
@temmplar ok, these ops are not system dependent. but thanks for the info.
grgsolymosi commentedon Jan 6, 2016
@jreback Furthermore I have some other additional info, which maybe would be a help to backcode the bug, if you need it, please contact me.