Skip to content

Commit

Permalink
aligns to the latest pypowsybl fixed_positions dataframe's column names
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Biasuzzi <[email protected]>
  • Loading branch information
CBiasuzzi committed Jan 27, 2025
1 parent 6ba0b65 commit 3b1e8e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pypowsybl_jupyter/networkexplorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ def extract_positions_dataframe_from_nad_metadata(nad_metadata):
tnodes_df = pd.DataFrame(nad_metadata['textNodes'])
merged_df = pd.merge(nodes_df, tnodes_df, on='equipmentId', how='left', suffixes=('_nodes', '_tnodes'))
result_df = merged_df[['equipmentId', 'x', 'y', 'shiftX', 'shiftY', 'connectionShiftX', 'connectionShiftY']]
result_df = result_df.rename(columns={'shiftX': 'legend_shift_x', 'shiftY': 'legend_shift_y',
'connectionShiftX': 'legend_connection_shift_x', 'connectionShiftY': 'legend_connection_shift_y'})
result_df.set_index('equipmentId', inplace=True)
result_df.index.name = 'id'
return result_df
Expand Down

0 comments on commit 3b1e8e3

Please sign in to comment.