I have a pandas dataframe with all floats. I'd like to turn these into integers, with thousands-separator. For example, 10000.00 would be 10,000. The dataframe only has floats with no null value.
Currently I am looping on the dataframe's rows. Example code:
for i in range(df.shape[0]):
df.iloc[i, :] = df.iloc[i, :].astype(int).apply('{:,}'.format)
Is there a more efficient way to do this? Preferably in one line?
Thanks in advance!