From 6ee1ea87f2017e305f03bba565d3a79adc7a5b8e Mon Sep 17 00:00:00 2001 From: GFHuang <4510984+GF-Huang@users.noreply.github.com> Date: Mon, 28 Feb 2022 01:24:36 +0800 Subject: [PATCH] Change `df.ta.to_utc` property to a method Change `df.ta.to_utc` property to a method, because it's not idempotent. See #496 --- pandas_ta/core.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pandas_ta/core.py b/pandas_ta/core.py index fdee64a..08dc8ac 100644 --- a/pandas_ta/core.py +++ b/pandas_ta/core.py @@ -366,11 +366,6 @@ class AnalysisIndicators(BasePandasObject): else: self._time_range = "years" - @property - def to_utc(self) -> None: - """Sets the DataFrame index to UTC format""" - self._df = to_utc(self._df) - @property def version(self) -> str: """Returns the version.""" @@ -516,6 +511,10 @@ class AnalysisIndicators(BasePandasObject): return name, mode # Public DataFrame Methods + def to_utc(self) -> None: + """Sets the DataFrame index to UTC format""" + self._df = to_utc(self._df) + def constants(self, append: bool, values: list): """Constants