Artificial intelligent assistant

特定の条件を満たす行のみを削除するには? pandasdataframedf selection1 df import pandas as pd import numpy as np df = pd.DataFrame( {'x': ['', '', '', '',]}, index=[1, 2, 3, 4, ]) consent_dic = {"":1, "":0} df["consent"] = df.apply(lambda row: consent_dic[row["x"]], axis=1) # selection1 = df.consent==0 # ? df.drop(df.consent.selection1)




import pandas as pd
import numpy as np

df = pd.DataFrame(
{'x': ['', '', '', '',]},
index=[1, 2, 3, 4, ])

df.drop(df.index[df.x == ''], inplace=True)

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy e02ba3ba303f48c2575f1ffcd18d0ec5