Skip to content

Commit

Permalink
Remove use of chained assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
samdoran committed May 8, 2024
1 parent 8af1135 commit bd1601a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions koku/masu/util/gcp/gcp_post_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import ciso8601
import pandas as pd

import q
from api.models import Provider
from masu.util.common import populate_enabled_tag_rows_with_false
from masu.util.common import safe_float
Expand Down Expand Up @@ -127,7 +127,8 @@ def _generate_daily_data(self, data_frame):
rollup_frame["credits"] = rollup_frame["credits"].apply(json.loads)
rollup_frame["daily_credits"] = 0.0
for i, credit_dict in enumerate(rollup_frame["credits"]):
rollup_frame["daily_credits"][i] = credit_dict.get("amount", 0.0)
rollup_frame.loc[:, ("daily_credits", i)] = credit_dict.get("amount", 0.0)

resource_df = rollup_frame.get("resource_name")
try:
if not resource_df:
Expand Down

0 comments on commit bd1601a

Please sign in to comment.