Trying to convert timestamps in _time column to numbers


I am trying to figure out a way to convert the _time column on a bucket I am querying from timestamps to a number representing the time stamp. So for example if I have a timestamp for 2020-10-06- 21:25:00 I need to have it returned as 202010621250.

I am querying some data and plan on using some calculating linear regression data and I can’t use timestamps. I have a function that does this but I am trying to optimize the program and not waste the CPU cycles doing that and just have the python library return the formatted timestamps along with the data. I have tried using the map function along with the date function but I keep getting errors. I am new to this platform.

Any help would be appreciated!!

Hello @georgeoffley,
I’m not sure how to do that…but maybe this is implementation of linear regression in flux is useful:

You could also try using the execd processor plugin to convert the timestamps in python.