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
Consider using pandas.datetime in these cases for consistency in data processing methods later, without the need to convert, for example to resample data using df = df.set_index('E4_seconds').resample("1S").mean().reset_index()
The text was updated successfully, but these errors were encountered:
@NeuroThom sorry I was a bit confused in the end about which one you recommend we should use, is it pd.DatetimeIndex or pd.to_timedelta? From the text I am assuming it should be pd.DatetimeIndex but just wanted to be sure.
I believe the types in the lines you quoted might have been left there for backwards compatibility, or to provide access to unconverted raw data, not entirely sure. If clock_offset is defined, the conversion to pd.Datetime is already there. Expanding your two examples for context:
Is the recommendation that we simply define a default clock_offset, e.g. 0, if no known offset is provided? Not sure in which cases would a clock_offset not be defined.
In pluma.io.empatica.py, parse_empatica_stream(), 'E4_Seconds' is used as a DatetimeIndex in one case:
pluma-analysis/pluma/io/empatica.py
Line 76 in d31bac2
But has dtype of <M8[ns] in these cases:
pluma-analysis/pluma/io/empatica.py
Line 74 in d31bac2
pluma-analysis/pluma/io/empatica.py
Line 91 in d31bac2
Consider using pandas.datetime in these cases for consistency in data processing methods later, without the need to convert, for example to resample data using
df = df.set_index('E4_seconds').resample("1S").mean().reset_index()
The text was updated successfully, but these errors were encountered: