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
As described in the GX Developer Forum, creating a GDB from a Pandas dataframe where the dataframe contains text fields throws an error since the dataframes report the text fields as dtype.type==np.object_ instead of np.str_. A simple addition to the function gx_dtype in the gxpy utility.py code avoids the error:
if dtype.type is np.str_:
# x4 to allow for full UTF-8 characters
return -int(dtype.str[2:])*4
elif dtype.type is np.object_:
# My edit, assign length 80 to all strings
return -int(80)
but I assume this is only a partial fix?
The text was updated successfully, but these errors were encountered:
I think a side-effect of this change is that all new fields created in the database within Geosoft default to being strings - even when numeric Channel Math or Coordinate Conversion calculations are performed.
As described in the GX Developer Forum, creating a GDB from a Pandas dataframe where the dataframe contains text fields throws an error since the dataframes report the text fields as
dtype.type==np.object_
instead ofnp.str_
. A simple addition to the function gx_dtype in the gxpy utility.py code avoids the error:but I assume this is only a partial fix?
The text was updated successfully, but these errors were encountered: