TA-Lib / ta-lib-python

Python wrapper for TA-Lib (http://ta-lib.org/).
http://ta-lib.github.io/ta-lib-python
Other
9.79k stars 1.78k forks source link

Polars DeprecationWarning: `columns` #586

Closed Tachy0o-n closed 1 year ago

Tachy0o-n commented 1 year ago

Polars deprecates 'columns' in the initialization of dataframes. It should be changed to 'schema'.

polars: 0.16.14 ta-lib: 0.4.25

import polars as pl
from talib import abstract 

df = pl.DataFrame([1,2,3,4,5,6,7,8,9,10], schema = ['close'])      #before: columns = ['close']
df_bbands = abstract.BBANDS(df)

DeprecationWarning: `columns` is deprecated as an argument to `__init__`; use `schema` instead.

I guess the code leading to the warning is line 378 in https://github.com/TA-Lib/ta-lib-python/blob/2e449cbb5d09dc5976558d221c47e19286b38e2f/talib/_abstract.pxi#L372-L378

mrjbq7 commented 1 year ago

Fixed in bc1841bdfd2bf8f4cf25d3a470acf1cd47603752.