Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mpvanderschelling committed Oct 11, 2024
1 parent 130ff78 commit 762a074
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 506 deletions.
15 changes: 0 additions & 15 deletions src/f3dasm/_src/experimentdata/_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,21 +382,6 @@ def drop(self, columns: Iterable[str] | str) -> _Data:
# Append and remove data
# =============================================================================

def add(self, data: pd.DataFrame):
try:
last_index = self.data.index[-1]
except IndexError: # Empty dataframe
self.data = data
return

new_indices = pd.RangeIndex(
start=last_index + 1, stop=last_index + len(data) + 1, step=1)

# set the indices of the data to new_indices
data.index = new_indices

self.data = pd.concat([self.data, data], ignore_index=False)

def add_empty_rows(self, number_of_rows: int):
if self.data.index.empty:
last_index = -1
Expand Down
Loading

0 comments on commit 762a074

Please sign in to comment.