dashboard_df = pd.read_csv(p_file, sep=',', error_bad_lines=False, index_col=False, dtype='unicode')
def convert_dtype(x):
if not x:
return ''
try:
return str(x)
except:
return ''
pd.read_csv('file.csv',converters={'first_column': convert_dtype,'second_column': convert_dtype})