Fixed casting between dataframe and numeric