Mar-29-2017, 11:17 PM
(Mar-29-2017, 09:11 PM)zivoni Wrote:df.groupby('Month').count()returns pandas serie with length equal to a number of unique items in df['Month'] column (these form index, values are items counts). So serie with aggregated values is usually "shorter" than length of original dataframe (unless there are only unique items in the Month column), and you cant assign it as a new column.
Thank you for helping me understand the concept.