number of unique pairs in columns pandas

#df named df1 columns A and B
df1.groupby(['A','B']).size().reset_index().rename(columns={0:'count'})

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
get unique pairs of values pandas pandas get unique pairs of columns pandas unique pairs in two columns pandas pairwise unique count df get unique pairs from two columns get all unique pairs from two columns pandas how to get unique column pairs pandas count unique pairs pandas unique column pairs count pandas get unique pairs from to dataframe columns pandas unique pairs of two columns pandas unique pairs of column values pandas return uique combinations of two columns in a dataframe as another dataframe pandas get each pair of unique rows pandas unique values pairs in multiple columns get unique pair values dataframe python pandas get all unique pairs find all unique combination of two rows pandas how to check combination of two columns unique in pandas get unique combination of two columns in pandas get total unique combinations of values of two columns in pandas count combinations of values of two columns in pandas python group by calling on the unique combinations selecting distinct combinations from python data frame how to get ubnique combination of multiple columns in python dataframe how to group distinct pairs in pandas how to drop unique pairs in a dataframe columns pandas unique value pairs find all combinations of values in pandas column unique combinations pandas df how to drop unique pair of values in pandas dataframe python select unique combinations from two columns extract unique pair dataframe columns -site:medium.com -site:towardsdatascience.com nunique of combination of columsn pandas unique column pairs pandas pandas column pair unique find combination of two columns count using pandas combination of 2 columns count in pandas how to select a combination of 3 columns in pandas unique combination columns how to find the number of unique combinations of a few columns python distinct combination two columns python impute pandas dataframe combination of 2 columns Pandas unique combination of multiple columns get unique combinations of two columns in pandas find the uniques of two columns combination pandas how to aggregate unique combination of column values in pandas pandas unique combinations of two columns pandas dataframe comunt of columns combination python unique combinations of two columns python check unique in a combination of columns pandas list unique combinations of two columns how to find unique combination of two columns in python pandas count combinations of two columns number of unique pairs in columns pandas
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source