i want to have a basic direct method to use different criteria to form new dataframes which i will display in a simple pie chart. i have such a feeble grasp of the topic that it seems to be difficult but there’s got to be some pretty basic methods of which i am unawares of.
essentially i want to isolate ranges of data… example, a set of 100 datapoints. perhaps the 100 most common values or the 100 lowest values or the 100 highest values.. .
for i in range(100):
global my_pie
my_pie = pd.DataFrame(data.iloc[[i],[1,3]])
display(my_pie)
so here i have this failed code as it only assigns the last iteration to the dataframe “my_pie”
i wanted a dataframe that had 100 rows for the iloc columns 1 and 3 of the “data” dataframe.
i want to understand the fundamentals of assigning different criteria for new dataframes from which i wish to display. the simple syntax is elusive to me.