0

I want to make a DataFrame from data of another Dataframe. my first table has 3 columns and I chose the min value of one of the columns and I want to choose two other corresponding value and put it on another DataFrame. but when I import it I get extra information that won't let me convert it to float64. what should I do?

a= fp['w']
b= fp[r'$\Omega_m$']
data={"best_value_w": [a], "best_value_$\Omega$": [b], "errors":[1]}

bv_table= pd.DataFrame(data, index=['1"$\sigma$"', '2"$\sigma$"', '3"$\sigma$"'])

here is what I get

but I want something like this, but without brackets, I want dtype to be float, not object

what I almost want but without brackets

1 Answers1

0

I found the answer, I should use astype like this :

bv_table[' best_value_w ']=bv_table.best_value_w.astype(float)

bv_table[' best_value_$\Omega$ ']=bv_table.best_value_omega.astype(float)

then I got a table like this:

Done!