Teddy Petrou on X: "In Pandas, there are a couple good ways to count the frequency of value occurrence between two or more columns. Use either pivot_table with aggfunc='size' or pd.crosstab. By
Pivot tables in Pandas and Handling Multi-Index Data with Hands-On Examples in Python | by Susan Maina | Towards Data Science
Reshaping and Pivot Tables — pandas 0.24.2 documentation