You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run a simple command to add TA lib indicators to a Pandas Dataframe (in Python3), I get the slice copy error. Will this be resolved in the next release?
Code (were df is a pandas dataframe)
ta.add_trend_ta(
df,
colprefix="BTC:",
**{k: "BTC:" + k for k in ['high', 'low', 'close']}
)
Note: the calculation work, but I get a lot of the following error messages.
Error Message:
C:\ProgramData\Anaconda3\lib\site-packages\ta\wrapper.py:95: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
close=df[close], high=df[high], low=df[low], n=10, fillna=fillna).average_true_range()
C:\ProgramData\Anaconda3\lib\site-packages\ta\wrapper.py:99: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df[f'{colprefix}volatility_bbm'] = indicator_bb.bollinger_mavg()
C:\ProgramData\Anaconda3\lib\site-packages\ta\wrapper.py:100: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df[f'{colprefix}volatility_bbh'] = indicator_bb.bollinger_hband()
C:\ProgramData\Anaconda3\lib\site-packages\ta\wrapper.py:101: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df[f'{colprefix}volatility_bbl'] = indicator_bb.bollinger_lband()
C:\ProgramData\Anaconda3\lib\site-packages\ta\wrapper.py:102: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df[f'{colprefix}volatility_bbw'] = indicator_bb.bollinger_wband()
The text was updated successfully, but these errors were encountered:
Hi,
When I run a simple command to add TA lib indicators to a Pandas Dataframe (in Python3), I get the slice copy error. Will this be resolved in the next release?
Code (were df is a pandas dataframe)
Note: the calculation work, but I get a lot of the following error messages.
Error Message:
The text was updated successfully, but these errors were encountered: