can't force string: to int64. row: 0 field: sometimes_empty
How should I be able to create a dataframe from a CSV with empty values, that still follows the dictated type and have NaN instead on the empty vlaues?
Expected output should be:
+-----+-----------------+--------+
| | SOMETIMES EMPTY | LABEL |
+-----+-----------------+--------+
| 0: | NaN | First |
| 1: | 2 | Second |
| 2: | NaN | Third |
| 3: | 4 | Fourth |
+-----+-----------------+--------+
| 4X2 | INT64 | STRING |
+-----+-----------------+--------+
When importing CSV and a field has empty values at some rows, import ignores the dictated data type and forces to interpret the field as string.
This code produces the error:
How should I be able to create a dataframe from a CSV with empty values, that still follows the dictated type and have NaN instead on the empty vlaues?
Expected output should be: