I have two python files in the same folder: main.py and analysis.py.
In the analysis.py file I have a pandas dataframe called df1
, inside a class called Ana(path, file)
I have imported the class to main.py successfully by writing from analysis import Ana
, but if I try to do something with df1 it says df1 is not defined.
How do I define df1 in the main.py file? I am quite new to Python so any help will be very appreciated, thank you.
P.S. I forgot to add, I am trying to use the df1 from the Ana function in the analysis.py file in the function Upload in the main.py file