Preview:
def prepare_master_datasets(df: pd.DataFrame, start_date: str = '2021-01-01', end_date:str = None, time_series_split: bool = True, test_start_date: str = '2021-01-01', test_end_date:str = None, test_size: float = 0.2, random_state: int = 42) -> pd.DataFrame:

	# function definition
    
# Funtion call

master_data, X_train_raw, X_test_raw = prepare_master_datasets(claims_data, 
                                                               start_date='2021-01-01', 
                                                               end_date='2022-12-31', 
                                                               time_series_split = True,
                                                               test_start_date = '2022-06-30', 
                                                               test_end_date = '2022-12-31',
                                                               test_size=0.2, random_state=SEED)
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter