Given the following data set, loaded into a Pandas DataFrame
BARCODE | ALTERNATE_BARCODE |
---|---|
123 | |
456 | 789 |
Imagine I have the following Pandas python Statement:
users.loc[users["BARCODE"] == "", "BARCODE"] = users["ALTERNATE_BARCODE"]
Is there any way - without rewriting this terse statement too much - that would allow me to access the number of rows in the DataFrame that got affected?
Edit: I am mainly on the lookout for the existence of a library or something build into Pandas that has knowledge of the last operation and could provide me with some metadata about it. Deltas is a good workaround, but not what I am after, since it would clutter the code.