Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
jackx111 committed Oct 7, 2024
1 parent e493712 commit bea5442
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions howso/utilities/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ def format_confusion_matrix(confusion_matrix: dict[str, dict[str, int]]) -> tupl

def yield_dataframe_as_chunks(df: pd.DataFrame, num_chunks: int) -> t.Generator[pd.DataFrame, None, None]:
"""
Splits and yields a DataFrame in chunks using iloc. Np.array_split is deprecated.
Yields a DataFrame in chunks using iloc. Np.array_split is deprecated.
Parameters
----------
Expand All @@ -1420,7 +1420,7 @@ def yield_dataframe_as_chunks(df: pd.DataFrame, num_chunks: int) -> t.Generator[
)
yield df

rows_per_chunk = ceil(total_rows // num_chunks)
rows_per_chunk = ceil(total_rows / num_chunks)

for i in range(num_chunks):
start = i * rows_per_chunk
Expand Down

0 comments on commit bea5442

Please sign in to comment.