This is the data in time column:
{'Thursday': {'0:00': 1, '23:00': 1, '21:00': 1}, 'Saturday': {'2:00': 1}, 'Monday': {'1:00': 1}}
But this code is giving me syntax error :
checkin_df['time_clean'] = map(lambda (x, y): map(lambda (k, v): map(lambda(i, value): [k, value, v.values()[i]], enumerate(v)), y.iteritems()), checkin_df['time'].iteritems())
I am getting the following error :
checkin_df['time_clean'] = map(lambda (x, y): map(lambda (k, v): map(lambda(i, value): [k, value, v.values()[i]], enumerate(v)), y.iteritems()), checkin_df['time'].iteritems())
^
SyntaxError: invalid syntax
Which part am I missing ? Could you please help ?
Try this (removed parenthesis):
checkin_df['time_clean'] = map(lambda x, y: map(lambda k, v: map(lambda i, value: [k, value, v.values()[i]], enumerate(v)), y.iteritems()), checkin_df['time'].iteritems())
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With