This has been driving me mad for the one last hour. I can draw a histogram when I use:
hist(df.GVW, bins=50, range=(0,200))
I use the following when I need to filter the dataframe for a given condition in one of the columns, for example:
df[df.TYPE=='SU4']
So far, everything works. When I try to get a histogram of this filtered data I get a key error: KeyError: 0L
. I use the following for the histogram of filtered data:
hist(df[df.TYPE=='SU4'].GVW, bins=50, range=(0,200))
Is there a syntax error somewhere? Thanks for the help!