Skip to content

Commit

Permalink
Merge pull request #125 from stat-kwon/master
Browse files Browse the repository at this point in the history
Add change type float to int when updating PIVOT table
  • Loading branch information
stat-kwon authored Dec 17, 2024
2 parents a7600ba + 42fd064 commit bdcbc85
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,8 @@ def _sort_and_filter_pivot_table(self, pivot_table: pd.DataFrame) -> pd.DataFram
pivot_table = self._apply_order_by(pivot_table, order_by, column_fields)

if limit := self.options.get("limit"):
if isinstance(limit, float):
limit = int(limit)
pivot_table = pivot_table.iloc[:, : len(self.label_keys) + limit]

pivot_table["Sub Total"] = self.total_series.loc[pivot_table.index]
Expand Down

0 comments on commit bdcbc85

Please sign in to comment.