probably a simple question but I can't find any solution.
I do have a file called irc_daten.py, where I built a class, called IrcData, that contains various methods. This methods collect several data in DataFrames that will be used in many files by importing the methods. But somehow I can't call this DataFrames.
This is irc_daten.py:
class IrcDaten():
def __init__(self):
pass
def stammdaten():
global stammdaten
stammdaten = pd.read_excel(path_stammdaten)
But using this DataFrame in another file doesn't seem to work:
from irc_daten import IrcDaten
IrcDaten.stammdaten()
print(stammdaten)
NameError: name 'stammdaten' is not defined
Any ideas? Thanks in advance.
question from:
https://stackoverflow.com/questions/65940836/how-to-call-a-dataframe-that-is-build-in-another-module-method 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…