Start learning 50% faster. Sign in now
The fillna() method in Pandas is used to replace NaN values in a DataFrame. By passing df.median() as an argument to fillna(), we can replace missing values with the median value of each column. This approach is especially useful when missing values are suspected to deviate from the mean due to outliers, making median imputation a more robust choice. The Pandas fillna() method is highly flexible and frequently used in data cleaning to handle missing data without discarding rows or losing valuable information in other columns. Option A (df.fillna(df.mean())) is incorrect as it fills NaNs with the mean rather than the median. Option B (df.replace(df.median())) is incorrect because replace() is not used directly for filling NaN values. Option D (df.dropna(inplace=True)) is incorrect as it removes rows with NaNs instead of filling them. Option E (df.interpolate(method="median")) is incorrect as interpolate() does not directly support median filling.
Water required to meet the demands of evapotranspiration (ET) and the metabolic activities of the plants together known as
The origin place of Holstein-Friesian breed of cow is -
A series of still pictures on one roll is called:
The type of market, when there is only one buyer of the product present in the market, is called:
Which one of the following statements is incorrect for the management of ‘wilt disease’ in chickpea?
The highest number of cut roses are sold on which day?
The albedo values for the cropped field is approximately ____ percent.
Sugarcane is considered mature, if Brix value is:
Banana is vegetatively propagated through
In the latest India State of Forest Report (ISFR) for the year 2021, the Forest Survey of India (FSI) has determined that the total forest cover of the ...