csv_2_plot: fix timestamp column assignment during timezone conversion
Signed-off-by: YoungSoo Shin <shinys000114@gmail.com>
This commit is contained in:
@@ -45,7 +45,7 @@ def plot_power_data(csv_path, output_path, plot_types, sources,
|
|||||||
else:
|
else:
|
||||||
# --- Timezone Conversion for absolute time ---
|
# --- Timezone Conversion for absolute time ---
|
||||||
local_tz = gettz()
|
local_tz = gettz()
|
||||||
df['timestamp'] = df['timestamp'].dt.tz_convert(local_tz)
|
df.loc[:, 'timestamp'] = df['timestamp'].dt.tz_convert(local_tz)
|
||||||
print(f"Timestamp converted to local timezone: {local_tz}")
|
print(f"Timestamp converted to local timezone: {local_tz}")
|
||||||
|
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
|
|||||||
Reference in New Issue
Block a user