I'm trying to create two files: one that will create a series of dataframe, and another that will import theses dataframes to my principal file.
Is something like this:
load_data.py
def data_mean():
import pandas as pd
global mean_re5200, mean_re2000
mean_re5200=pd.read_csv('mean_re5200.csv')
mean_re2000=pd.read_csv('mean_re5200.csv')
main_project.py
from load_data import data_mean
When I run the main_project file and type data_mean() in the terminal, all seems fine, but the dataframes aren't save as local variables that I can use them. I saw another similar quotes here in StackOverFlow, but no one was about saving dataframe, only simple variables.
How can I proceed?
load_data, just as with any other local variable.returnandprint?