Python Pandas Tutorial 8. Concat Dataframes

  Рет қаралды 211,476

codebasics

codebasics

Күн бұрын

Пікірлер: 99
@codebasics
@codebasics 2 жыл бұрын
Check out our premium machine learning course with 2 Industry projects: codebasics.io/courses/machine-learning-for-data-science-beginners-to-advanced
@supremeleader8796
@supremeleader8796 3 жыл бұрын
Hi, your tutorials are very good for intuitive understanding of what the code is doing. I find that every time I have a technical problem and need to study for solutions, an indian lecturer will have something on youtube that helps. Thank you indian lecturers, thank you all for sharing.
@gauravsharma-zb1ku
@gauravsharma-zb1ku 7 жыл бұрын
One of the best pandas tutorial.Thanx alot.
@codebasics
@codebasics 5 жыл бұрын
Machine learning tutorials with exercises are available at: kzbin.info/www/bejne/nZ7Zp5Sll9Jqm7M
@rajshah7940
@rajshah7940 5 жыл бұрын
Dear Dhaval, can your lecture be able to crack any data analytics positions?
@codebasics
@codebasics 5 жыл бұрын
Step by step guide on how to learn data science for free: kzbin.info/www/bejne/jJ_CnqCFqraeiaM Machine learning tutorials with exercises: kzbin.info/www/bejne/nZ7Zp5Sll9Jqm7M
@arturcarvalhodossantos7263
@arturcarvalhodossantos7263 2 жыл бұрын
I can't express how much your course is thrilling! I had no interest at all in DataScience, but you made me want to learn it more and more, never stop teaching.
@vamshikumar7336
@vamshikumar7336 2 жыл бұрын
My doubts are cleared totally with this tutorial, covered each and every small details.
@flamboyantperson5936
@flamboyantperson5936 7 жыл бұрын
I love your videos. Respect you for providing free knowledge in this age of business. Thank you so much. You are doing a social work you will get blessings of people.
@flamboyantperson5936
@flamboyantperson5936 7 жыл бұрын
For sure you will see good things happening in your life. You could become a great Professor. You teach everything in the simplest way I just love it. Thank you.
@vfr45rfv
@vfr45rfv 6 жыл бұрын
Your tutorials are the best I have gone through so far, my sincere thanks to you!
@callback_ai
@callback_ai 6 жыл бұрын
best basics tutorial I've used so far
@shantanuhule8784
@shantanuhule8784 4 жыл бұрын
Thanks you sir , your videos help me a lot , I am a second year student , I Know basic language like python ,c++, java , but I had no idea what to do after that ,, Your videos are helping me a lot and gaining more n more knowledge in python After the end of every video I feel like I am getting closer to my dream to become a data scientist Thanks you sir 🙂
@codebasics
@codebasics 4 жыл бұрын
All the best Shantanu :)
@in_ashish
@in_ashish 6 ай бұрын
Thank you sir 3000! I will update once I get my bread and butter, honestly enjoying learning like never before!
@followthepassion1530
@followthepassion1530 4 жыл бұрын
Really helpful tutorials for the newbies like me....thank you so so much...
@codebasics
@codebasics 4 жыл бұрын
Glad it was helpful!
@joshnoni5609
@joshnoni5609 Жыл бұрын
Hello, At 12:04 in this video, I noticed you passed an index in both temperature and windspeed data frames. it was quite easy to figure out the order of the index. What happens when you're working with a dataset of millions of values and indexes. We cannot manually sort out each index. How can we go about that?
@kashifaziz5019
@kashifaziz5019 Жыл бұрын
You can use merge in that case
@ibtissamchouja7113
@ibtissamchouja7113 2 жыл бұрын
thank you i was looking for this kind of tuto great job
@hocexcelonline4943
@hocexcelonline4943 5 жыл бұрын
Thank you so much. Best pandas tutorial, very easy to understand due to your explanation.
@tymothylim6550
@tymothylim6550 3 жыл бұрын
Thank you very much for this video! It helped me understand how the concat function works!
@codebasics
@codebasics 3 жыл бұрын
I am happy this was helpful to you.
@bt78646
@bt78646 Жыл бұрын
This video is blurry. Btw,Thanks a lot for this great playlist.May Allah bless u and keep you on the right path.
@darshikaverma9170
@darshikaverma9170 4 жыл бұрын
Best and clear explanation. Thanks a lot :)
@codebasics
@codebasics 4 жыл бұрын
I am glad it was helpful
@siddhantsachdeva3388
@siddhantsachdeva3388 6 жыл бұрын
Hi, at 10:16 when you concatenated with axis=1 it appended the dataframe with the 'city' column again. Is there a way to concatenate with axis=1 without this column appearing twice in your final dataframe? Basically I would like my final dataframe to have just 'city', 'temperature' and 'windspeed' (and not 'city', 'temperature', 'city', 'windspeed')
@siddhantsachdeva3388
@siddhantsachdeva3388 6 жыл бұрын
thank you
@faisalsal1
@faisalsal1 4 жыл бұрын
Joining should be based on Column Values like Mumbai to Mumbai, instead of manually making sure if Mumbai have index 1 in first dataframe, it must have 1 in second dataframe as well. In a small set, may be possible but if 1000s of records, would be tedious to making sure that related entries in different dataset to have matching index value. Besides the above issue, overall good tutorial.
@BlazeXth
@BlazeXth 4 жыл бұрын
So, should 'city' be set as the index instead of the default numerical value?
@harimurugesan8367
@harimurugesan8367 7 жыл бұрын
difficult concepts are explained in a easy a manner
@abhi9029
@abhi9029 5 жыл бұрын
Nice tutorial. Keep up the good work.
@codebasics
@codebasics 5 жыл бұрын
Thanks AK
@SophiaandHaakenPedersen
@SophiaandHaakenPedersen 6 жыл бұрын
Thank you for your excellent tutorials
@juandiegocaballero5404
@juandiegocaballero5404 11 күн бұрын
nice tutorial! Does anyone know where i can find some good exercise for pandas?
@dpeduchem7393
@dpeduchem7393 6 жыл бұрын
Great skill of explanation. Thanks
@surajm6236
@surajm6236 Жыл бұрын
merged_df = X.merge(Y, left_on = 'key', right_on = 'key') for easier way of merging two pds
@Kitaplayolculuk
@Kitaplayolculuk 4 жыл бұрын
your lecture is brilliant . Thank you ;)
@basupm7558
@basupm7558 6 жыл бұрын
you are my God .. please let me know if you are condcting any training .. I am very happy to join your classes
@jugrajsingh9450
@jugrajsingh9450 6 жыл бұрын
codebasics have u uploaded tutorials for simple python
@oneaboveallthe7398
@oneaboveallthe7398 2 жыл бұрын
when you use index at 12:24 you are using it for small dataset right when you will use millions of data then how are we going to solve the same problem bcoz we cant write the index of every columns in the big dataset, so how you will solve the problem??
@CoolGuy-ez8lj
@CoolGuy-ez8lj 6 жыл бұрын
Hi, I have a question @ 10.26 and 12.11 in the above video. You have concatenated using axis or index reference fine. How to ignore or avoid the city names getting repeated in as new additional row ?
@CoolGuy-ez8lj
@CoolGuy-ez8lj 6 жыл бұрын
Thanks !!!!
@haneulkim4902
@haneulkim4902 5 жыл бұрын
what was the answer?
@shivadumnawar7741
@shivadumnawar7741 4 жыл бұрын
Thank you so much, sir. great work
@Al-Ahdal
@Al-Ahdal 4 жыл бұрын
Boss, as requested earlier.... when I expect to get "Comprehensive Data Analysis Series" from you. Waiting for a detailed series covering all aspects of data analysis. Thank you Sir.
@aashah747
@aashah747 3 жыл бұрын
I have no words I can only say: "Matchless"
@spicytuna08
@spicytuna08 6 жыл бұрын
thanks for a great tutorial.
@sandeepmesa
@sandeepmesa 6 жыл бұрын
Very clear explanation..however when i have small data set ican set index ..what if i am dealing with millions of data set..how to ensure the indexing is fine?
@keshavswami6618
@keshavswami6618 5 жыл бұрын
sir , ar 12:10 , still we have 2 same column...how to delete that one
@codebasics
@codebasics 5 жыл бұрын
You can use drop function to delete a column, pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.drop.html
@karthikak2193
@karthikak2193 6 жыл бұрын
@CodeBasics, How to remove an 'CITY' column which showing twice?
@malasubramanian9654
@malasubramanian9654 2 жыл бұрын
I have a single table and I want to merge two-row cells together in a particular column. how do I do that in python?
@girishjahagirdar4379
@girishjahagirdar4379 3 жыл бұрын
Tutorial is very helpful. However I have a question on DataFrame. How to create a DataFrame when I have an URL that returns a JSON data ? Any hints would help
@youcefyahiaoui1465
@youcefyahiaoui1465 7 жыл бұрын
Great tutorials. Except that I keep understanding that the speaker is saying "Not book" instead of notebook. Otherwise, perfect work. Kudos!
@mickaelfonseca2962
@mickaelfonseca2962 3 жыл бұрын
Thank you for the tutorial. However when i try on a specific application (one df containing only the collumn names, and another one with exact same column names) part of the data appears in new collumns (duplicate) leaving blank collumns. What could be the problem?
@StrikerTide
@StrikerTide 5 жыл бұрын
What's the difference between merge, append and join in general data world? A good video but would have preferred if the terms were not used interchangeably and confusingly.
@codebasics
@codebasics 5 жыл бұрын
append is used only to append using index which means you can add rows but not the columns in a dataframe. merge and join are kind of similar, they are more like database joins where you can join or merge two dataframess at column levels.
@soumikdam6442
@soumikdam6442 7 жыл бұрын
Good Tutorial. Appreciate it. But Bangalore has lower temperature and humidity
@akki6071
@akki6071 3 жыл бұрын
Nice I got one issue in sheet 1 I have multiple data in column one cell like (1,2,3,4) many cells I have to compare them with another column in sheet 2 but sheet 2 I have only single digit number in column cell like (1) if sheet 1 matches with sheet 2 then should replace with new values which is also present in sheet 2
@gileswhiting2891
@gileswhiting2891 5 жыл бұрын
Manually amending the indexes such that the rows align before concatenating the data frames seems like a very manual solution, particularly given that each data frame could have thousands of rows... Surely this is a sub-optimal solution?
@gileswhiting2891
@gileswhiting2891 5 жыл бұрын
I wrote this just before the end of the video where he talks about "merge". IF you have the same question as me - watch the next tutorial lol!
@codebasics
@codebasics 5 жыл бұрын
👍😊
@gokulyc
@gokulyc 4 жыл бұрын
how to remove extra city column in df at 11:03?
@darshikaverma9170
@darshikaverma9170 4 жыл бұрын
df.drop('City', axis = 1, inplace = True)
@gokulyc
@gokulyc 4 жыл бұрын
@@darshikaverma9170 There are 2 city cols, i want to remove second one.
@jiefu295
@jiefu295 4 жыл бұрын
@@gokulyc df = df.loc[:,~df.columns.duplicated()]
@SOMEONE-eq5bu
@SOMEONE-eq5bu 3 жыл бұрын
@@jiefu295 thanks
@PhucPham-my2qb
@PhucPham-my2qb Жыл бұрын
i wonder the file named DataScience, What is it for?
@shaikansarbasha4169
@shaikansarbasha4169 4 жыл бұрын
Sir you told axis=1 means row but you are telling now column.I have confusion sir.Please help me
@debatradas9268
@debatradas9268 2 жыл бұрын
thank you so much
@rKingSalami
@rKingSalami 5 жыл бұрын
how will you extract the month name from the date in one of the files you used?
@codebasics
@codebasics 5 жыл бұрын
If month is in mm/dd/yyyy format then you can do dt.split('/')[0] to get month
@shobhamourya8396
@shobhamourya8396 6 жыл бұрын
Yes, merge is more like the sql join than concat
@jarirafaelcabarcasbolivar3946
@jarirafaelcabarcasbolivar3946 4 жыл бұрын
If I have three columns: year,month and day in a data set, is possible convert in a column ( date) year-month-day? I want to generate a series time, but the data set Have four columns!!!
@codebasics
@codebasics 4 жыл бұрын
Yes you can generate a new column by using apply function.
@johnmwansa4180
@johnmwansa4180 4 жыл бұрын
brother help us the video how to change this number 76896 to replac 2 to remove 8 to be come like this 76296 using python.
@arkabose89
@arkabose89 6 жыл бұрын
Hey man, what if i have huge data frames with cities in different indexes? I cant surely type indexes like u did in the video.
@techytalky3678
@techytalky3678 6 жыл бұрын
I think you would have to look at the Merge video where he says that indices arent required.
@bishalkumardas1169
@bishalkumardas1169 2 жыл бұрын
but you have not told about join inner/outer parameter
@hayacheemaceema926
@hayacheemaceema926 7 жыл бұрын
Aoa. sir plz tell me how i can download csv file which you provide.. i try much butstill unsuccessful
@hayacheemaceema926
@hayacheemaceema926 7 жыл бұрын
thnkx
@yashpandey350
@yashpandey350 4 жыл бұрын
without talking much about it let's start it🤣🤣🤣🤣🤣
@haneulkim4902
@haneulkim4902 5 жыл бұрын
what is the difference with pd.append ?
@codebasics
@codebasics 5 жыл бұрын
Pd.append appends new dataframe only on x axis whereas concat can do it both on x and y axis. Pandas documentation explains this difference pretty well: pandas.pydata.org/pandas-docs/stable/user_guide/merging.html
@jayshreedonga2833
@jayshreedonga2833 2 жыл бұрын
Thanks sir
@SOMEONE-eq5bu
@SOMEONE-eq5bu 3 жыл бұрын
👍👍👍
@mayankverma7287
@mayankverma7287 2 жыл бұрын
thank you
@jayshreedonga2833
@jayshreedonga2833 2 жыл бұрын
thanks sir
@subee128
@subee128 2 жыл бұрын
Thanks
@harshsinghv
@harshsinghv 6 жыл бұрын
How can I retrieve the combination of most common value in two columns Lets Say Column1 Column2 A B C D A B now i want to return AB
@BlazeXth
@BlazeXth 4 жыл бұрын
A little late but in SQL you'd want to count the times each combination appears and then retrieve the max ammount of all those apparitions, i think. Surely there's something similar in Pandas that can do that, hopefully.
@manishsharma2211
@manishsharma2211 2 жыл бұрын
Nice
@shahlanoura4347
@shahlanoura4347 Жыл бұрын
good...
@omharne1386
@omharne1386 Жыл бұрын
like this
@motiongraphic5145
@motiongraphic5145 3 жыл бұрын
جميل جدا
@jackroark6928
@jackroark6928 2 жыл бұрын
Brilly!
@codeministry
@codeministry Жыл бұрын
How do I apply the index if I have thousands of rows?
Python Pandas Tutorial 9. Merge Dataframes
7:41
codebasics
Рет қаралды 252 М.
My top 25 pandas tricks
27:38
Data School
Рет қаралды 272 М.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Learning Pandas for Data Analysis? Start Here.
22:50
Rob Mulla
Рет қаралды 125 М.
How to combine DataFrames in Pandas | Merge, Join, Concat, & Append
13:40
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Rob Mulla
Рет қаралды 279 М.
Pandas functions: merge vs. join vs. concat
16:15
Mısra Turp
Рет қаралды 27 М.
How do I use the MultiIndex in pandas?
25:01
Data School
Рет қаралды 176 М.
Pandas for Data Science in 20 Minutes | Python Crash Course
23:06
Nicholas Renotte
Рет қаралды 144 М.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН