Skip to content

Commit

Permalink
extract users features done
Browse files Browse the repository at this point in the history
extract items features done
filter unkown item done
  • Loading branch information
0zone committed Apr 18, 2015
1 parent 0bb648c commit 7e202da
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,10 @@ def split_file_by_date(raw_file_path, begin, end):
split_file.write(line)

raw_file.close()
split_file.close()
split_file.close()


def parse_line(line):
user_id, item_id, behavior_type, user_geohash, item_category, time, date = line.split(delimiter)
date = datetime.datetime.strptime(date, "%Y-%m-%d %H")
return user_id, item_id, behavior_type, user_geohash, item_category, time, date

0 comments on commit 7e202da

Please sign in to comment.