Skip to content

Commit

Permalink
Add charging points getter again
Browse files Browse the repository at this point in the history
  • Loading branch information
birgits committed Jun 11, 2024
1 parent c17015b commit cc25888
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions edisgo/network/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,22 @@ def switches_df(self):
def switches_df(self, df):
self._switches_df = df

@property
def charging_points_df(self):
"""
Returns a subset of :py:attr:`~loads_df` containing only charging points.
Returns
-------
:pandas:`pandas.DataFrame<DataFrame>`
DataFrame with all chargings points in the grid.
"""
if "charging_point" in self.loads_df.type.unique():
return self.loads_df.loc[self.loads_df.type == "charging_point"]
else:
return pd.DataFrame(columns=COLUMNS["loads_df"])

@property
def id(self):
"""
Expand Down

0 comments on commit cc25888

Please sign in to comment.