# 8.41:  use pd.to_numeric.  Change the 'a' and 'b' columns to a numeric type, and show dtypes
# afterwards.

import pandas as pd

dol = {  'a': ['1', '2', '3'],
         'b': ['2.9', '3.5', '4.9'],
         'c': ['yourstr', 'mystr', 'theirstr']  }

df = pd.DataFrame(dol, index=['w', 'x', 'y'])


print(df.dtypes)


df.a = pd.to_numeric(df.a)
df.b = pd.to_numeric(df.b)

print(df.dtypes)

