Skip to content

Instantly share code, notes, and snippets.

@gary136
Created December 24, 2019 14:02
Show Gist options
  • Select an option

  • Save gary136/afd4eddc63af9e73f8ab8780475ae6e4 to your computer and use it in GitHub Desktop.

Select an option

Save gary136/afd4eddc63af9e73f8ab8780475ae6e4 to your computer and use it in GitHub Desktop.
multiple_aplly_pandas.py
def add_key(x):
sku = x[0]
r_id = x[1]
for ele in sku:
ele['receipt_id'] = r_id
return sku
df['sku'] = df[['sku', 'receipt_id']].apply(add_key, axis=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment