Module pandas_profiling.controller.pandas_decorator
This file add the decorator on the DataFrame object.
Source code
"""This file add the decorator on the DataFrame object."""
from pandas import DataFrame
from pandas_profiling.__init__ import ProfileReport
def profile_report(df, **kwargs) -> ProfileReport:
"""Profile a DataFrame.
Args:
df: The DataFrame to profile.
**kwargs: Optional arguments for the ProfileReport object.
Returns:
A ProfileReport of the DataFrame.
"""
p = ProfileReport(df, **kwargs)
return p
DataFrame.profile_report = profile_report
Functions
def profile_report(df, **kwargs)
-
Profile a DataFrame.
Args
df
- The DataFrame to profile.
**kwargs
- Optional arguments for the ProfileReport object.
Returns
A ProfileReport of the DataFrame.
Source code
def profile_report(df, **kwargs) -> ProfileReport: """Profile a DataFrame. Args: df: The DataFrame to profile. **kwargs: Optional arguments for the ProfileReport object. Returns: A ProfileReport of the DataFrame. """ p = ProfileReport(df, **kwargs) return p