time_data Module
Contains functionality for representing time data and related operations in opendatasets.
Classes
TimeCustomerData |
Represents a customer dataset with time. Initialize with customer data frame. |
TimeData |
Defines the base time data class. |
TimePublicData |
Represents a public dataset with time. Initialize with columns. |
Functions
add_datetime_col
Add rounded datetime column.
add_datetime_col(dataset: DataFrame | DataFrame, time_col_name: str, time_func: object)
Parameters
Name | Description |
---|---|
dataset
Required
|
|
time_col_name
Required
|
|
time_func
Required
|
|
extend_time_column
Extend time column for string type.
extend_time_column(dataset: DataFrame | DataFrame, time_col_name: str, timeVal: str | float | struct_time | datetime)
Parameters
Name | Description |
---|---|
dataset
Required
|
|
time_col_name
Required
|
|
timeVal
Required
|
|
find_min_max_date
Find min and max date from a SPARK dataframe.
find_min_max_date(dataset: DataFrame | DataFrame, time_col_name: str)
Parameters
Name | Description |
---|---|
dataset
Required
|
|
time_col_name
Required
|
|
pd_parse_time
Parse time string and catch exception.
pd_parse_time(time_string)
Parameters
Name | Description |
---|---|
time_string
Required
|
The time string to parse. |
spark_parse_time
Parse time string and catch exception.
spark_parse_time(time_string)
Parameters
Name | Description |
---|---|
time_string
Required
|
The time string to parse. |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for