Member-only story
Data Science
10 Quick Pandas Tricks to Energize your Analytics Project
Use these tricks to make your life easy as an analyst
Pandas is the popular data analytics library in Python. It certainly provides you the flexibility and the tools you need to process the data.
However, You must know time-saving and easy-to-use tricks for efficient working. That’s why I’m sharing 10 quick yet highly useful tricks in pandas, which you can master in under 10 minutes.
Even if you are already well versed with pandas methods and functions, you will still find some of these tricks actionable. If you are an absolute beginner, then this article is right place to start your learning.
Here is a quick index for your reference —
· Adjust the number of columns or rows to display
· Randomly sample rows with sample()
· Subset a dataframe with the query() method
· Round values in pandas DataFrame with round()
· Unpack the list values using the method explode()
· Create quick plots with the plot() method
· Return multiple DataFrames with display()
· Count unique values with nunique()
· Return a cumulative summary with cumsum()
· Aggregate by multiple functions using agg()