Skip to content

Commit

Permalink
fix: A value is trying to be set on a copy of a slice from a DataFrame
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek-amar committed Oct 23, 2023
1 parent 90eeabf commit 5d9d71e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openbb_terminal/stocks/fundamental_analysis/fmp_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ def clean_metrics_df(data: pd.DataFrame, num: int, mask: bool = False) -> pd.Dat
"""
# iloc will fail if number is greater than number of columns
num = min(num, data.shape[1])
data = data.iloc[:, 0:num]
data = data.iloc[:, 0:num].copy()

if mask:
data = data.mask(data.astype(object).eq(num * ["None"])).dropna()
Expand Down

0 comments on commit 5d9d71e

Please sign in to comment.