Wide & Deep 자습서가 작동하려고하지만 다음 줄은 github 및 웹 사이트에서 코드를 복사하여 붙여 넣을 때 계속 문제를 발생시킵니다. Tensorflow Wide & Deep 예제가 작동하지 않습니다.
df_train["income_bracket"].apply(lambda x: ">50K" in x)).astype(int)
나는
TypeError: argument of type 'float' is not iterable
내가 람다 기능도 익숙하지 않다하지만 난
for i in range(len(df_train)):
if df_train.loc[i,'income_bracket']=='>50k':
df_train.loc[i,LABEL_COLUMN] =1
else:
df_train.loc[i,LABEL_COLUMN] =0
를 사용하지만 것은 가지고 있음을 시도 그래서 더미 변수를 만드는 생각 아래의 오류를 얻을 오류
TypeError: Expected binary or unicode string, got nan
이 자습서는 어떻게 작동합니까?