About Lesson
Some Advanced Pandas functions are taught here.
Join the conversation
in contrast, kindly any one here can guide type casting in Pandas
Reply
in contrast, kindly any one here can guide type casting in Pandas
Reply
Assalamualikum sir.
Assignment1:
df = df.assign(height = pd.to_numeric(df['height']))
df.weight=df.weight.astype('int64')
df.Favourite_Dish=df.Favourite_Dish.astype("category")
Reply
Asalam-0-Alaikum Dr Sab
I have found these results after running the code of df.describe()height weights
count 87.000000 87.000000
mean 5.547931 70.459770
std 0.333321 16.753899
min 5.000000 25.000000
25% 5.250000 60.000000
50% 5.600000 70.000000
75% 5.800000 80.000000
max 6.200000 125.000000These are different from your results. Is it right?
Reply
Same here with df.describe(). Any solution
After type casting: _____df.sort_values(by="weight")______________________________________height weight favourite_dish _____________________________________
5.0 25 Biryani_______________________________________________________
5.0 31 Biryani_______________________________________________________
5.2 48 Biryani_______________________________________________________
5.6 49 Chicken Pulao_______________________________________________
5.0 50 Chicken Pulao
Reply
df.column() with paranthesis aik function ki trah deal krta hy jo k Atribute error deta hy jbky df.column dataframe mein individual columns ko access or onky upar kam krny k lye use hota hy
Reply
*Correction* its df.columns and it is used to show you the labels of all the columns in your table. It returns a list of the column names as text.
sana your student
Reply
Type Casting is already done in previous video sir why you are asking for wrangling again ?
Reply