Skip to content

Commit

Permalink
remove more spurious df.copy s
Browse files Browse the repository at this point in the history
  • Loading branch information
nikml committed May 24, 2024
1 parent dabddd1 commit 4c79794
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions nannyml/chunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,6 @@ def _split(self, data: pd.DataFrame) -> List[Chunk]:
if data.shape[0] == 0:
return []

data = data.copy().reset_index()

chunk_size = data.shape[0] // self.chunk_number
chunks = SizeBasedChunker(
chunk_size=chunk_size, incomplete=self.incomplete, timestamp_column_name=self.timestamp_column_name
Expand Down Expand Up @@ -515,8 +513,6 @@ def _split(self, data: pd.DataFrame) -> List[Chunk]:
if data.shape[0] == 0:
return []

data = data.copy().reset_index(drop=True)

chunk_size = data.shape[0] // self.DEFAULT_CHUNK_COUNT
chunks = SizeBasedChunker(chunk_size=chunk_size, timestamp_column_name=self.timestamp_column_name).split(
data=data
Expand Down

0 comments on commit 4c79794

Please sign in to comment.