def multiply_if_number(x):
    return x * 1000000.0 if type(x) in [int, float] else x
energy['Energy Supply'] = energy['Energy Supply'].apply(multiply_if_number)
How to multiply only the numeric values in a column