When loading data from the DataFrame, the float type becomes the double type

This is my DataFrame data:
image
I run the query by select * from Capacitor where NomV_kV==12.47 , It returns a null value.


and vertex define as follow: CREATE VERTEX Capacitor(PRIMARY_ID id STRING, Code STRING, Phases INT, NomV_kV FLOAT, Size_kVAr FLOAT, longitude FLOAT, latitude FLOAT)

I get it ‘expecting double’ when I run query in pyTigergraph

So I want to know what I should do so that it can be queried through 12.47 (float instead of string or double)

This is an interesting problem you have encountered.

Perhaps try modifying your schema to make the “NomV_kv” attribute of the Capacitor vertex a DOUBLE instead of a FLOAT?

This shouldn’t disrupt any input loading processes, as per the docs:

“DOUBLE has the same input and output format as FLOAT, but the range and precision are greater.”

You should be able to keep all the same functionality in your code as it was written for FLOATs.

1 Like

Thank you very much for your reply!
According to your prompt, I changed FLOAT to DOUBLE and then reloaded the data.Now it works normally

1 Like