i am trying to eliminate my ".0" on a specified column. The dtype for the column is an object. I export my dataframe as a .txt file and it keeps showing with decimals. I do not want to round.
I've tried several methods,
df['foDealId'] = df['foDealId'].astype(str).replace('\.0','',regex=True)
. I get no change in my data.
and
df['foDealId'] = df['foDealId'].str.replace('.0','')
. I get my number truncated in the middle of it where there was a 0. ie 2451669285571 14
and
df['foDealId'].loc[mask] = df['foDealId'].loc[mask].astype(np.int64)
df['foDealId'] = pd.to_numeric(df.foDealId, errors='coerce').fillna(0).astype(np.int64)
any ideas on how to fix?