I want to fill '0' value in another column value.
Data is like,
I want to fill '0.000000e 00' value with self_reported_market_cap and self_reported_circulating_supply columns.
So I'd tried,
condition1 = df_result['유통시총(조)'] == 0
condition2 = df_result['유통량(백만)'] == 0
df_result[condition1]['유통시총(조)'] = df_result[condition1]['self_reported_market_cap']
df_result[condition2]['유통시총(백만)'] = df_result[condition2]['self_reported_circulating_supply']
But, nothing happened.
CodePudding user response:
You should do like below:
df_result.loc[condition1,'유통시총(조)'] = df_result.loc[condition1,'self_reported_market_cap']