20 lines
391 B
Python
20 lines
391 B
Python
from pandas import DataFrame
|
|
|
|
|
|
class DropNulls:
|
|
"""
|
|
Data model that removes null values from a DataFrame.
|
|
"""
|
|
|
|
def transform(self, x: DataFrame) -> DataFrame:
|
|
"""
|
|
Remove rows with null values from the DataFrame.
|
|
|
|
Args:
|
|
x: Input DataFrame
|
|
|
|
Returns:
|
|
DataFrame with null rows removed
|
|
"""
|
|
return x.dropna()
|