Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
- netcdf4 >=1.5.5,!=1.6.1
- pandas >=2.1.0
- pip
- polars>=1.24.0
- polars>=1.33.0
- pooch
- pre-commit
- pydantic >=2.0
Expand Down
6 changes: 4 additions & 2 deletions intake_esm/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,10 @@ def _read_csv_pl(self) -> FramesModel:
.str.replace('^.', '[') # Replace first/last chars with [ or ].
.str.replace('.$', ']') # set/tuple => list
.str.replace(',]$', ']') # Remove trailing commas
.str.replace_all("'", '"')
.str.json_decode() # This is to do with the way polars reads json - single versus double quotes
.str.replace_all(
"'", '"'
) # This is to do with the JSON spec- single versus double quotes
.str.json_decode(dtype=pl.List(pl.Utf8))
for colname in converters.keys()
]
)
Expand Down
Loading