Skip to content

Commit 4156869

Browse files
committed
trying fix import error
1 parent da656b3 commit 4156869

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/py_ssa_lib/datasets/load_global_average_temperatures.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@
33
# https://www.kaggle.com/datasets/shishu1421/global-temperature/data
44
def load_global_average_temperatures_df(rawDS=False):
55

6-
dir_path = os.path.dirname(os.path.realpath('__file__'))
6+
dir_path = os.path.dirname(os.path.realpath(__file__))
77
if rawDS:
88
df_csv = os.path.join(dir_path,"GlobalLandTemperaturesByMajorCity.csv")
99
return pd.read_csv(filepath_or_buffer=df_csv , sep=",")
1010
else:
1111
df_csv = os.path.join(dir_path,"GlobalLandTemperaturesByMajorCity.csv")
12-
glob_temp_df = pd.read_csv(filepath_or_buffer=df_csv, sep=",")
13-
glob_temp_df = glob_temp_df.dropna(axis=0)
14-
glob_temp_df.dt = pd.to_datetime(glob_temp_df.dt)
15-
cols_list = glob_temp_df["dt"]
16-
glob_temp_df = glob_temp_df.drop(columns=["dt"]).T
17-
glob_temp_df.columns = cols_list.values
18-
12+
glob_temp_df = pd.read_csv(filepath_or_buffer=df_csv, sep=",")
13+
glob_temp_df = glob_temp_df.dropna(axis=0)
14+
glob_temp_df.dt = pd.to_datetime(glob_temp_df.dt)
15+
cols_list = glob_temp_df["dt"]
16+
glob_temp_df = glob_temp_df.drop(columns=["dt"]).T
17+
glob_temp_df.columns = cols_list.values
18+
1919
return glob_temp_df
20+
21+

0 commit comments

Comments
 (0)