I have a .csv that was created using input_xls.to_csv, and everything delimits correctly. However, within some of the string records are commas (e.g. a business name like 'Widgets, Inc.'). The result is incorrect delimiting when importing the .csv into a file geodatabase using arcpy.conversion.TableToTable - values end up shifted over into other columns. I want to replace the commas with a space.
I cannot figure out how to use either something like
.apply(lambda x: x.replace(',', ' '))
or
[val if val else " " for val in row] + ([" "] * (len(first_row) - len(row))) (found here: https://community.esri.com/t5/python-questions/find-and-replace-blanks-in-csv-with-python/m-p/673632)
Any help to nudge me in the right direction would be appreciated. Thanks.