Spaces:
Running
Running
File size: 485 Bytes
1cd56b6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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!")
|