Skip to content

Commit

Permalink
fix for pandas=0.23
Browse files Browse the repository at this point in the history
  • Loading branch information
ZEMUSHKA committed Aug 12, 2018
1 parent f717ad7 commit ef61caa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion week4/lfw_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def load_lfw_dataset(

# read attrs
df_attrs = pd.read_csv(ATTRS_NAME, sep='\t', skiprows=1)
df_attrs = pd.DataFrame(df_attrs.iloc[:, :-1].values, columns=df_attrs.columns[1:])
df_attrs.columns = list(df_attrs.columns)[1:] + ["NaN"]
df_attrs = df_attrs.drop("NaN", axis=1)
imgs_with_attrs = set(map(tuple, df_attrs[["person", "imagenum"]].values))

# read photos
Expand Down

0 comments on commit ef61caa

Please sign in to comment.