I have loaded an arff file to python using this code:
import pandas as pd, scipy as sp
from scipy.io import arff
datos,meta = arff.loadarff(open('selectividad.arff', 'r'))
d = pd.DataFrame(datos)
When I use head function to see the data frame, this is how it looks:
However, those 'b' are not present in the arff file as we can see below: https://gyazo.com/3123aa4c7007cb4d6f99241b1fc41bcb What is the problem here? Thank you very much
b
are python's way of displaying abytes
array and are not part of the data.b
indicate you're treating a byte string, litterally a sequence of octets, whcih are ASCII cahracters. You can decode them using.decode("utf-8")
for instance.