Created
November 18, 2022 06:39
-
-
Save akashlevy/d18d16aa9dffa9c3a147c825dbe7a303 to your computer and use it in GitHub Desktop.
5-line CSV merge :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
metrics = pd.read_csv("metrics.csv", skipinitialspace=True) | |
perms = pd.read_csv("perms.csv", skipinitialspace=True).iloc[:,:-1] | |
result = pd.merge(metrics, perms, how="inner", on=["id", "session"]) | |
result.to_csv("merged.csv", index=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment