No video

Pandas Unique Values | Python Pandas Tutorial #11 | Pandas Unique and Nunique Functions

  Рет қаралды 10,979

datagy

datagy

Күн бұрын

Learn how to work with unique values in a Pandas dataframe, using the Pandas unique() and nunique() functions. You'll learn how to count unique values, generate frequencies of unique values, and count unique values across different columns.
0:00 Introduction
0:30 Pandas Unique Function
1:55 Generate List of Unique Values in Pandas Dataframe Column
3:00 Count Unique Values in Pandas Dataframe Column
3:40 Unique Values Across Multiple Dataframe Columns
4:46 Frequency of Unique Values in Pandas Dataframe
5:20 Pandas nunique Function
6:01 Conclusion
Learn Python programming the right way!
----------------------------------------------------------
✅ Check out my eBook to get started with Python for Data Science: gumroad.com/l/....
✅ Follow me on other platforms:
Website: datagy.io
Twitter: / datagyio
Mailing List: mailchi.mp/f6a.... (and get a FREE Pandas tip and tricks book and a FREE Guide to SQL)

Пікірлер: 28
@jobimathew2842
@jobimathew2842 3 жыл бұрын
I was looking across duplicate values for multiple columns and I finally got the solution!! Thanks a lot!!
@datagy
@datagy 3 жыл бұрын
I'm so glad it helped!
@amirahmadi3025
@amirahmadi3025 18 күн бұрын
very useful. tnx
@fabriciogouvea9951
@fabriciogouvea9951 2 жыл бұрын
Thank you!!! i am from Brazil
@datagy
@datagy 2 жыл бұрын
Thanks for your comment! 😊
@MrRedef
@MrRedef 2 жыл бұрын
Really helpful and straight foward, thank you very much!
@datagy
@datagy 2 жыл бұрын
I’m glad it was helpful!
@sanketsan5409
@sanketsan5409 2 жыл бұрын
thank you. thar was really helpfull
@datagy
@datagy 2 жыл бұрын
Thanks Sanket! I’m glad it was helpful.
@ganderamu5138
@ganderamu5138 Ай бұрын
Im getting additional information in while finding unique values for a column in dataset how to fix this
@abessesmahi4888
@abessesmahi4888 3 жыл бұрын
Thank you so much for your efforts Please keep uploading more on Pandas. Subscribed !
@datagy
@datagy 3 жыл бұрын
Thank you!! I will have more videos coming soon!
@ilaydelrey3122
@ilaydelrey3122 Жыл бұрын
thank you! maybe you could also publish your notebook to play around, directly :)
@harshadapatil2854
@harshadapatil2854 Жыл бұрын
bestest video
@majddabour97
@majddabour97 4 жыл бұрын
Thanks a Lot my friend, appreciate your efforts! Looking forward to the next videos ... especially the one About ML algorithms ♥
@datagy
@datagy 4 жыл бұрын
Thanks so much! I have some exciting ones planned!
@CaptainBravo87
@CaptainBravo87 2 жыл бұрын
Thanx!
@datagy
@datagy 2 жыл бұрын
Thanks Mahmoud, for your comment!
@brendynford
@brendynford 2 жыл бұрын
Thank you so much for this!!! It was a huge help
@datagy
@datagy 2 жыл бұрын
Thank you so much Brendyn!
@menachemgerst
@menachemgerst 2 жыл бұрын
how can I create a list or a new df by drop_duplicate on more than one column? like creating a list from the unique() function?
@datagy
@datagy 2 жыл бұрын
Hey there! What values would you want the list to contain? Pair-wise values of the unique combinations?
@TheMISBlog
@TheMISBlog 2 жыл бұрын
Thanks for the tutorial
@datagy
@datagy 2 жыл бұрын
Thanks for the comment!
@PsPFrEaKz95
@PsPFrEaKz95 3 жыл бұрын
Hi im having troubles on printing all the values of a column on my csv file which includes duplicate values. The .unique is good to print a column with all unqiue numbers. I was wondering what do i use to print all values in a column with duplicate values without the numbering column involved
@datagy
@datagy 3 жыл бұрын
Hi Fikri, I think you'll need to do a few things: Chances are, there'll be too many records to print so you'll need to enlarge how many rows are printed. This can be done using: pd.set_option('display.max_rows', 500) Where 500 can be replaced by the length of your dataframe. In order to stop printing the index, I believe you can use df.style.hide_index() or print(df.to_csv(sep='\t', index=False)) Hope this helps!
@PsPFrEaKz95
@PsPFrEaKz95 3 жыл бұрын
@@datagy hello again. My csv file contains 97 rows. as an example of my problem: 0.69999 0.69999 0.69999 102.365 142.536 the pandas .unique just prints out the 1 unique value which is 0.69999 and continues the next unique. what i got printed out with .unique is: 0.69999 102.365 142.536 the 2 missing 0.6999 values are not printed. sry for the long reply
@datagy
@datagy 3 жыл бұрын
@@PsPFrEaKz95 Ah ok! Are you looking to just print the whole dataframe? If your dataframe is called df, try just running print(df) If you want to just print a single column, you can use print(df["column name"]) Hope this helps!
小蚂蚁被感动了!火影忍者 #佐助 #家庭
00:54
火影忍者一家
Рет қаралды 53 МЛН
CHOCKY MILK.. 🤣 #shorts
00:20
Savage Vlogs
Рет қаралды 27 МЛН
Pool Bed Prank By My Grandpa 😂 #funny
00:47
SKITS
Рет қаралды 18 МЛН
Learning Pandas for Data Analysis? Start Here.
22:50
Rob Mulla
Рет қаралды 92 М.
How to filter a pandas DataFrame | 6 HELPFUL METHODS
17:27
Chart Explorers
Рет қаралды 29 М.
Python Map Function
13:40
datagy
Рет қаралды 4,7 М.
Python Classes and Objects - OOP for Beginners
8:01
Python Simplified
Рет қаралды 546 М.
Complete Python Pandas Data Science Tutorial! (2024 Updated Edition)
1:34:11
小蚂蚁被感动了!火影忍者 #佐助 #家庭
00:54
火影忍者一家
Рет қаралды 53 МЛН