I have a pandas dataframe which has byte strings as elements in a column:
E.g. b'hey'
.
When I write this dataframe to a csv and read if afterwards, pandas will return a
string with the following form "b'hey'"
.
This is a problem, because when calling tf.data.Dataset.from_tensor_slices
the string will be casted to a byte string again and will have the following form:
b"b'hey'"
.
Specifying the dtype when reading the csv with dtype = {"COLUMN_NAME":bytes}
didn't to anything.
Has anyone a solution to this without manually changing the string and removing the b?