-
- Notifications
You must be signed in to change notification settings - Fork 19.4k
Closed
Labels
BugDtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsGroupby
Milestone
Description
In this snippet:
import pandas as pd import numpy as np print 'numpy', np.__version__ print 'pandas', pd.__version__ df = pd.DataFrame({'x': [],'range': np.arange(0)}) t = df.sort('x').groupby('x').first() print 'types', df['range'].dtype, t['range'].dtype it is shown that after the groupby, an empty "int" column becomes an empty "float". This is the output on my machine:
numpy 1.6.2 pandas 0.13.1 types int32 float64 Metadata
Metadata
Assignees
Labels
BugDtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsGroupby