I am summarizing a DF which contains both numeric and categorical variables. Have faced below challenges while using group_by and summarize functions,
While trying to measure the mode for a numerical variables using 'statistics.mode' function in group_by, it shows me below error.
Code :- Temp2 = Df3 >> group_by(X.ID) >> summarize(AirTemp = statistics.mode(X.Weather_detailsAirtemperature))
Error :- TypeError: iter() returned non-iterator of type 'Intention'
Summarizing categorical variable:- With unique in dplyr from R, I am able to summarize categorical variable however its not the same case in dfply - python, even distinct doesn't worked.
Code:-
Test = Df3 >> group_by(X.ID) >> summarize(Precipitation = distinct(X.Precipitation))
Hi All,
I am summarizing a DF which contains both numeric and categorical variables. Have faced below challenges while using group_by and summarize functions,
While trying to measure the mode for a numerical variables using 'statistics.mode' function in group_by, it shows me below error. Code :- Temp2 = Df3 >> group_by(X.ID) >> summarize(AirTemp = statistics.mode(X.Weather_detailsAirtemperature)) Error :- TypeError: iter() returned non-iterator of type 'Intention'
Summarizing categorical variable:- With unique in dplyr from R, I am able to summarize categorical variable however its not the same case in dfply - python, even distinct doesn't worked.
Code:- Test = Df3 >> group_by(X.ID) >> summarize(Precipitation = distinct(X.Precipitation))
Sample data