Time manip
TimeManip
¶
convert_datetime_to_ms
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df |
DataFrame
|
The dataframe to operate onw |
required |
convert_datetime_to_s
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df |
DataFrame
|
The dataframe to operate onw |
required |
convert_duration_to_timestamp
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df |
DataFrame
|
The dataframe to operate onw |
required |
convert_ms_to_datetime
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df |
DataFrame
|
The dataframe to operate onw |
required |
convert_s_to_datetime
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df |
DataFrame
|
The dataframe to operate onw |
required |
days_ago
¶
Return X days ago
Parameters:
Name | Type | Description | Default |
---|---|---|---|
days |
The number of days ago you want to return |
0
|
|
to_timestamp |
weather to return a timestamp or not |
False
|
Source code in src/tradingtoolbox/utils/time_manip.py
hours_ago
¶
Return X hours ago
Parameters:
Name | Type | Description | Default |
---|---|---|---|
hours |
The number of hours ago you want to return |
0
|
|
to_timestamp |
weather to return a timestamp or not |
False
|
Source code in src/tradingtoolbox/utils/time_manip.py
minutes_ago
¶
Return X hours ago
Parameters:
Name | Type | Description | Default |
---|---|---|---|
hours |
The number of hours ago you want to return |
required | |
to_timestamp |
weather to return a timestamp or not |
False
|
Source code in src/tradingtoolbox/utils/time_manip.py
months_ago
¶
Return X months ago
Parameters:
Name | Type | Description | Default |
---|---|---|---|
months |
The number of months ago you want to return |
0
|
|
to_timestamp |
weather to return a timestamp or not |
False
|
Source code in src/tradingtoolbox/utils/time_manip.py
pd_days_ago
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df |
DataFrame
|
The dataframe to operate onw |
required |
days |
The number of days ago |
0
|
Source code in src/tradingtoolbox/utils/time_manip.py
pd_hours_ago
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df |
DataFrame
|
The dataframe to operate onw |
required |
hours |
The number of hours ago |
0
|
Source code in src/tradingtoolbox/utils/time_manip.py
pd_months_ago
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df |
DataFrame
|
The dataframe to operate onw |
required |
months |
The number of months ago |
0
|