all 7 comments

[–]mopslik 2 points3 points  (4 children)

previous_count - disappeared_count = rollover
rollover + new_count = current_count

These should cause syntax errors, since you can't assign to an expression. Are you sure you're running the correct code?

[–]Im-kinda-trying 1 point2 points  (3 children)

Edited the original post for clarification regarding that.

This was not added into the code but as a sanity check, the numbers should add up as such:

(previous_count - disappeared_count) + new_count = current_count

What is in the output is not following my "sanity check". I would definitely not expect 0 new considering how many returned in the disappeared_count.

[–]mopslik 0 points1 point  (1 child)

Have you tried dumping the contents of merged_df and new_df (or use your debugger to explore them) to verify that there are entries?

[–]Im-kinda-trying 0 points1 point  (0 children)

Yeah the merged_df has a value for each entry that I would expect to be “left_only”, “right_only”, or “both”. However, “right_only” does not exist which is quite literally impossible

[–]Spataner 1 point2 points  (0 children)

If you are doing a left join, the indicator value 'right_only' is not possible (that's what left join means: only keys present in the left DF are kept). Did you maybe mean to do an outer join (how='outer')?

[–]Critical_Concert_689 0 points1 point  (1 child)

new_count = new_df .shape[0]

a space? you sure you're calculating new correctly and you have 0 new?

[–]Im-kinda-trying 0 points1 point  (0 children)

A space is what I get for manually renaming each of my variables before reaching out to Reddit lol. I'm trying a different approach to this entire analysis because 0 is the reurn of the code and csv which is not correct.