How to save the global vars (or any other variable)
# Create a fileimportpandasaspdfromsave_load_varsimportsave_vars_pkldf=pd.read_csv(
"https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv"
)
defmyfunction(x):
returnstr(x) +"bbbb"myfunction2=lambdak: myfunction(k)
partofframe=df.Name.copy()[:50]
# Save the global vars save_vars_pkl(g=globals(), folder=f"f:\\pklsavetest", interface="dill", protocol=None)
The Tidelift Subscription provides access to a continuously curated stream of human-researched and maintainer-verified data on open source packages and their licenses, releases, vulnerabilities, and development practices.