Commit 14ce8e47 authored by Bruno Duyé's avatar Bruno Duyé

#452: fix wrong regex

parent 708bf508
Pipeline #68617 failed with stage
in 43 seconds
......@@ -222,7 +222,7 @@ def iterate_dataset(filepath):
'half year'), "unexpected time dimension: {!r}".format(time_dimension_lower)
if time_dimension_lower == 'month':
# Bug #452: some data contains 'O' instead of '0'
dataframe.replace({time_dimension.label: {r'(\d{4})MO([1-9])': r'\1-M0\2'}}, regex=True, inplace=True)
dataframe.replace({time_dimension.label: {r'(\d{4})MO([1-9])': r'\1M0\2'}}, regex=True, inplace=True)
# "2014M01" => "2014-01"
dataframe.replace({time_dimension.label: {r'(\d{4})[Mm](\d{2})': r'\1-\2'}}, regex=True, inplace=True)
elif time_dimension_lower == 'quarter':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment