the most common diff is count does not include any NaN values, but size does
Type and Dimension:
the dataset contains a number of tasters,
Question: How can we check , who are the most common reviewers in the dataset?
ans:1. count(), 2.size()
1.count()
if you see the o/p , reviews_by_count returns a dataframe, which is ndarray.
at first we group the data by same taster_name, then for groups contains every columns except in index(taster_name)
let's see the type:
as you see it returns a DataFrame as a object
2.size()
as u see it didn't return any multiple columns , only one column,
Let's check the type:
Well, it returns a series(1D object)
Usage at diff. time****
Question: What combination of countries and varieties are most common?Create a Series whose index is a MultiIndexof {country, variety} pairs. For example, a pinot noir produced in the US should map to {"US", "Pinot Noir"}.Sort the values in the Series in descending order based on wine count
as we see it returns a DataFrame , where it is a multi index country and variety.
as per the question, we have to sort by values
as you see, i try to implement sort_values() in decending order, at first i did not give any column, so it
throws me error, but in 2nd time i sort respective to price column,
it shows the fundamental structure of count, bco'z it is a ndarray , it needs a specific col among all columns
but in case of size():
as you see it returns only a column,
and we can sort it without passing by='' parameter, bco'z it has only 1 column to sort.