What I am trying to do is trying to detect weather a dataset is time series or not? I want to automate this process.
Let's say I have the below datasets as:
df1:
Heading 1 | Heading 2 | Heading 1 | Heading 2 |
---|---|---|---|
1/1/2023 | 34 | 12 | 34 |
2/1/2023 | 42 | 99 | 42 |
3/1/2023 | 42 | 99 | 42 |
4/1/2023 | 42 | 99 | 42 |
df2:
Heading 1 | Heading 2 | Heading 1 | Heading 2 |
---|---|---|---|
1/1/2023 | 34 | 12 | 34 |
3/1/2023 | 42 | 99 | 42 |
4/1/2023 | 42 | 99 | 42 |
7/1/2023 | 42 | 99 | 42 |
df3:
Heading 1 | Heading 2 | Heading 1 | Heading 2 |
---|---|---|---|
Jan 2023 | 34 | 12 | 34 |
Feb 2023 | 42 | 99 | 42 |
Mar 2023 | 42 | 99 | 42 |
df4:
Heading 1 | Heading 2 | Heading 1 | Heading 2 |
---|---|---|---|
2020 | 34 | 12 | 34 |
2021 | 42 | 99 | 42 |
2022 | 42 | 99 | 42 |
df1
has time column which is evenly spaced, df2
has time column but it is not evenly spaced and df3
and df4
have a time column which is not in the format of datetime
Out of the above df
, which one is a time series data and which is not? What exactly is the criteria for a dataset to be considered as time series?
Thanks!