Q. Write code statements for a dataframe df for the following:
(a) Delete an existing column from it.
(b) Delete rows from 3 to 6 from it.
(c) Check if the dataframe has any missing values.
(d) Fill all missing values with 999 in it.
Answer =
(a) del df[“existing column name ”]
(b) df.drop([2,3,4,5])
(c) df.isnull()
(d) df.fillna(999)
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )