macpie.pandas.add_diff_days#

macpie.pandas.add_diff_days(df: DataFrame, col_start: str, col_end: str, diff_days_col: str | None = None, inplace=False)#

Adds a column whose values are the number of days between col_start and col_end

Parameters:
dfDataFrame
col_startstr

column containing the start date

col_endstr

column containing the end date

diff_days_col: str, default=``mp.get_option(‘column.system.diff_days’)``

Give the added column a different name other than the default

inplacebool, default False

Whether to add the column in place or return a copy

Returns:
DataFrame

A DataFrame of the result.