I have a strange problem that I don't understand. I have a file date_import.py with several functions in it. (I don't want to show these functions here because they all are quite long.) I would like to import these functions in Jupyter. So I write 'from date_import import func1' and it works. But if I write 'from date_import import func1, func2' I get the answer "cannot import name func2". Also if I write 'from date_import import func2' i get the same answer. I thought at first that python somehow cannot see the changes in my file. But if I change the code in func1 and use inspect.getsource then, I can see that python accept the changes. But I still cannot import other functions, only func1. Did somebody see such behavior and knows some way around? Thanks in advance.
PS. Here is the function 2.
def func2(stichtag_sql):
sql = """(select distinct .....
)"""
tab = sqlContext.read.jdbc(url=jdbcURL, table=sql, properties=prop).cache()
totale_wbs = tab.toPandas()
totale_wbs.columns = map(str.lower, totale_wbs.columns)
totale_wbs.kdnr =totale_wbs.kdnr.astype(str)
return totale_wbs