Simple, self-explanatory code snippets.
import pandas as p pythonList = ['banana','apple','banana','pear','banana','pineapple','apple'] pandasDataFrame = p.DataFrame( pythonList , columns=(['Fruit Name']) ) pandasSeries = pandasDataFrame.groupby(['Fruit Name']).size() print pandasSeries
No comments:
Post a Comment