diff --git a/README.md b/README.md index 2660118..0de212b 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ $ pip install pandas_ta Latest Version -------------- -Best choice! Version: *0.3.00b* +Best choice! Version: *0.3.01b* * Includes all fixes and updates between **pypi** and what is covered in this README. ```sh $ pip install -U git+https://github.com/twopirllc/pandas-ta diff --git a/pandas_ta/core.py b/pandas_ta/core.py index fd294e8..7eba78e 100644 --- a/pandas_ta/core.py +++ b/pandas_ta/core.py @@ -400,6 +400,9 @@ class AnalysisIndicators(BasePandasObject): df = self._df if df is None or result is None: return else: + if "col_names" in kwargs and not isinstance(kwargs["col_names"], tuple): + kwargs["col_names"] = (kwargs["col_names"],) + if isinstance(result, pd.DataFrame): # If specified in kwargs, rename the columns. # If not, use the default names. diff --git a/setup.py b/setup.py index db22a22..2e840e7 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setup( "pandas_ta.volatility", "pandas_ta.volume" ], - version=".".join(("0", "3", "00b")), + version=".".join(("0", "3", "01b")), description=long_description, long_description=long_description, author="Kevin Johnson", diff --git a/tests/test_strategy.py b/tests/test_strategy.py index 86a44ae..cbe7921 100644 --- a/tests/test_strategy.py +++ b/tests/test_strategy.py @@ -253,6 +253,7 @@ class TestStrategyMethods(TestCase): {"kind": "rsi"}, # 1 {"kind": "macd"}, # 3 {"kind": "sma", "length": 50}, # 1 + {"kind": "sma", "length": 100, "col_names": "sma100"}, # 1 {"kind": "sma", "length": 200 }, # 1 {"kind": "bbands", "length": 20}, # 3 {"kind": "log_return", "cumulative": True}, # 1