Cache read CSV response
from functools
import lru_cache
import pandas as pd
@lru_cache(maxsize=None)
# cache all function callsdef
load_csv_file(filename): df = pd.read_csv(filename) return dfAug 30, 20241 min read
from functools
import lru_cache
import pandas as pd
@lru_cache(maxsize=None)
# cache all function callsdef
load_csv_file(filename): df = pd.read_csv(filename) return df