I have to clean CSV file Data. The data that I am trying to clean is below. Condition: I have to add @myclinic.com.au at the end of every string where it is missing.
[email protected]
mildura
[email protected]
[email protected]
nowa [email protected]
[email protected]
[email protected]
[email protected]
logan village
[email protected]
The code for this is
DataFrame = pandas.read_csv(ClinicCSVFile)
DataFrame['Email'] = DataFrame['Email'].apply(lambda x: x if '@' in str(x) else str(x)+'@myclinic.com.au')
DataFrameToCSV = DataFrame.to_csv('Temporary.csv', index = False)
print(DataFrameToCSV)
But the output that I am getting is none and I could not work on the later part of the Problem as it is generating the error below
TypeError: 'NoneType' object is not iterable
which is originated by the above data frame. Please Help me with this.