-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Copy link
Milestone
Description
Initial Checks
- I have searched existing issues for duplicates
- I have read the documentation
Summary
Time_period cast to String shows the Time_Period internal representation as string instead of the time_period_output_format.
Reproducible Example
script = """
DS_str := DS_1[calc Me_2 := cast(Me_1, string)];
DS_filtered := DS_str[filter Me_2 = "2021"];
Data_in_2022 <- DS_filtered[drop Me_2];
"""
data_structures = {
"datasets": [
{
"name": "DS_1",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": False},
{"name": "Me_1", "type": "Time_Period", "role": "Measure", "nullable": True},
],
}
]
}
data_df = pd.DataFrame({"Id_1": [1, 2, 3], "Me_1": ["2020", "2021", "2022"]})
datapoints = {"DS_1": data_df}
run_result = run(
script=script,
data_structures=data_structures,
datapoints=datapoints,
time_period_output_format="natural",
)vtlengine version
1.6.2
Python version
Any
OS
Any
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels