You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I have run into this situation where I have the region_id from multiple EVR files, and I merged the Regions2D.data dataframe and then saved the rows I want into a csv file. Then I used read_region_csv to read the csv back as a Regions2D object. However, during the merging of multiple r2d.data dataframes, I had to alter the values of region_id so that the ids are unique, otherwise read_region_csv will throw error. The change I made was something like 0707_17, for a region from July 7, region_id=7, just so that the region_id would not be identical with region_id from other EVRs, like below:
But when the csv was read back into a Regions2D using read_region_csv, the region_id column was read as int64:
From the code it seems that the only place we require region_id to be an int is when creating it from the EVR file since it was from text. I wonder why this happens, and also wondering if region_id should always be an integer, or that we allow it to be other type too? In that case I guess I can explicitly cast it before saving?
@ctuguinay have you run into something like this before?
The text was updated successfully, but these errors were encountered:
So I have run into this situation where I have the
region_id
from multiple EVR files, and I merged theRegions2D.data
dataframe and then saved the rows I want into a csv file. Then I usedread_region_csv
to read the csv back as aRegions2D
object. However, during the merging of multiple r2d.data dataframes, I had to alter the values ofregion_id
so that the ids are unique, otherwiseread_region_csv
will throw error. The change I made was something like 0707_17, for a region from July 7, region_id=7, just so that the region_id would not be identical with region_id from other EVRs, like below:But when the csv was read back into a
Regions2D
usingread_region_csv
, the region_id column was read as int64:From the code it seems that the only place we require
region_id
to be an int is when creating it from the EVR file since it was from text. I wonder why this happens, and also wondering ifregion_id
should always be an integer, or that we allow it to be other type too? In that case I guess I can explicitly cast it before saving?@ctuguinay have you run into something like this before?
The text was updated successfully, but these errors were encountered: