import pandas as pd import os cache_file = "market_data_cache.pkl" if os.path.exists(cache_file): df = pd.read_pickle(cache_file) print("Columns structure type:", type(df.columns)) if isinstance(df.columns, pd.MultiIndex): close = df["Close"] else: close = df print("Start date in cache:", close.index[0]) print("End date in cache:", close.index[-1]) print("Number of columns:", len(close.columns)) else: print("Cache file not found!")