text_plain_output_1.png
import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

ci = pd.read_csv('../input/farmers-markets-in-the-united-states/wiki_county_info.csv')
fm = pd.read_csv('../input/farmers-markets-in-the-united-states/farmers_markets_from_usda.csv')

def convert_dollar_number(data):
    if type(data) == float:
        return data
    elif type(data) == str and '$' in data:
        return int(''.join(data.split('$')[1].split(',')))
    elif type(data) == str and '$' not in data:
        return int(''.join(data.split(',')))
for i in range(3, 8):
    ci[ci.columns[i]] = ci[ci.columns[i]].apply(convert_dollar_number)
print('\n{:^30}'.format('Change Data Format'))
print('*' * 120)