 What's going on everybody? Welcome back to another video today. We are gonna be comparing Python versus R. We're gonna see which one is better Now before I start this presentation. Yes, I made an entire presentation for this video I have to address the elephant in the room about a month ago. I made a somewhat controversial post I don't think it's controversial. Some people did apparently and it's right here. Hopefully on your screen at this time All it says is Python is better than R. That's my opinion But it's stirred up a lot of emotions for a lot of people a lot of people messaged me commented on it and Apparently a lot of people took offense to what I said and they wanted me to explain Why I felt this way and I did not respond for the pure fact that it was more fun to watch them argue and complain rather than answer their question But also I knew I was gonna be making this video anyways And so I just figured they could watch this video whenever I put it out Which is right now and so if you are only on LinkedIn and you've never watched my channel before and you are just seeing through this for the first time And you remember that time when I posted it I hope this will be clarifying for you. And so without further ado, let's get into the presentation And we will start from there Alright, so some of the things that we're gonna be discussing today in our Python versus R Presentation is we're gonna be talking about descriptions different libraries the code slash syntax pros and cons of both and my final answer I will say before we get into it. I'm not trying to go super in-depth. I Tried to make it as user-friendly as possible If you know you guys are really wanting a more in-depth Presentation on just one of these I can absolutely do that I plan on doing that at some point, but this is gonna be kind of high level and More talking about my thoughts and my feelings regarding this because it is a very emotional thing. I believe Without further ado, let's get into the description of both again keeping it more high level and Kind of getting to some specifics and then my conclusion So let's look at the description of both Python and R starting with our R is a programming language developed for Statistical analysis and the people who mostly used it for a long long time were statisticians and just recently within the past You know five ten years has really been used for data science and data analysis and visualizations and all of those things I was developed in 1993 again, like I just said primarily for statisticians data miners and analysts And it's used by a ton of very large companies Some of them are uber Facebook and Google But there are tons of companies and even small companies that use R And so if your company does any type of statistics or statistical analysis There's a good chance that your company has either used R in the past or is currently using R as a programming language Now onto Python Python is a general-purpose programming language. It's used for almost anything you can imagine It may not be the best thing for every single thing it can do But it can do almost anything and so it's very general very broad It is quickly becoming the most popular programming language in the world And it is used by companies like Google Facebook and Netflix now If you notice in the companies that use Python and R both Facebook and Google are on that list And that wasn't by accident I did that on purpose because I wanted to show that These companies large companies are gonna use both programming languages for what they're good for Which obviously we will talk about later But I wanted to just kind of put that there for I guess foreshadowing now before we look at libraries and packages I just want to say that if I did not highlight your favorite library or package on here I am sorry. There are so many especially with R There's just hundreds and thousands of different packages and libraries I just can't possibly put them all on here And so these are just a highlight of some of the more popular ones the ones that I have personally used And so I hope that you are not offended by that, but let's start with our For data collection, you can use things like our crawler read Excel Read RL and our curl for data wrangling exploration There's dplier sequel df data dot table read R and tidy R and for data visualization There's ggplot2 ggviz plotly esquist and shiny and over to Python for data collection There's pandas requests and beautiful soup data wrangling and exploration There's pandas numpy and scipy and for data visualization. There is matplotlibs seaborne and plotly Again, this is just a high-level overview of some of the packages in each of these programming languages If you have never used our or Python, I think these packages are a really good place to start Now for the code and the syntax on both of these I try to stay neutral on this I tried to just kind of say what everyone else was saying because I have my own very strong thoughts and opinions on this But you know, I wanted to say somewhat unbiased at least for this one But for our it's easy slash medium Difficulty to pick up and start working from from scratch You know, if you've never picked up our it can be kind of difficult to pick up a Little bit more advanced it can be difficult to maintain your code Especially as you start to scale Your code and so that is a big problem that a lot of people have addressed or talked about with our With Python again, it's easy slash medium difficulty to pick up and learn I Think it can be about the same difficulty as our in my opinion And that's what a lot of people said and so that's not just my opinion But it's easier to write and maintain larger scale code And so as you start building larger projects or join larger teams or take on more data It's just easier to scale up now into some syntax examples I 100% cherry pick these but I do feel like they're pretty representative of what the code looks like as a whole And so a lot of people are probably gonna get mad at me saying no are as much easier than this And you may be right in some aspects, but for the most part, I feel like this is fairly accurate We're just reading in a CSV file and then trying to find the mean on a column or a field That's about it. And as you can tell ours just a little bit more Difficult a little bit more complicated Python's a little bit more cleaner It's a little bit more easy to read and pick up and that's something that a lot of people say about Python It's very easily readable now Let's look at some of the pros and cons of both but we're starting with are some of the pros or that it is open source It is fantastic for statistical analysis has hundreds of packages and libraries purely for analytics And that's what our is it's purely for statistics and analyzing data And lastly, it is easy to build visualizations with our Now for the cons it can't be embedded in web applications and from what I've read that's purely for security reasons And so that is a big downside of using our you need to know a large amount of packages and libraries You can't just know like one or two Kind of like in Python, you can know pandas and you can do a lot of different things with it R doesn't really have that you have to know Several things in order to get kind of one task done and lastly arc and run slow because of how they store their data So those are some of the pros and the cons of our now Let's move on to Python some of the pros for Python or its open source It's easy to read and learn especially if you're just picking it up for the first time It can be embedded into web applications, which can be very important for a lot of people And there's a growing number of libraries for data analysis There are of course growing number of libraries and packages for our as well But those are quite more well established while Python is still growing and they're coming out and they're catching up to our fairly quickly For the cons the processing speed can be slow, especially depending on what library package you're using But you know, I think that's a con in both our and Python on some level. They're going to run slow Uses a large amount of memory kind of part of the why it's running slow. It's simple to learn It's simple to use and sometimes that's an issue actually because it's so simple When you need to do really complicated things it can be kind of hard to do where an R That's what it's built for. It's made for those complex Calculations and so that's why those packages and libraries are built the way they are and lastly the libraries for all analytics needs Are still being developed and so yes, it is a pro that those numbers are growing But it's still a con that they're you know behind R And so R has more being developed and more already developed in terms of all their libraries and packages being built out Where Python it is still growing now on to my final answer, which is better Python or R? It really depends But going back to my LinkedIn post that we talked about the very beginning I will say that I still 100% believe that Because to me for my type of work the stuff that I do Python is 100 times better It's 100 times more useful and so to me Python is better than R But it really does depend on what you're using it for and so if you're doing purely statistical work R is going to be the better choice if you're doing machine learning Python is arguably much better in my opinion R is harder to learn, but it has more features while Python is easier to learn But isn't as developed yet. And so what I genuinely think you should do is I think you should try both I think you really need to get some hands-on experience take a course in both Just see what you think and and determine for yourself what you think is better I really will go back to that LinkedIn for a second. I believe that for me personally Python is just better I can use it for so many things it is in my opinion Much better suited for me and what I do for my job And so for me Python is way better But for other positions and other people are maybe the programming language of choice and I'm totally okay with that There were a lot of people in the comments who are writing You know, it just depends and and you know, why don't you think that one is why do you think that one is better than the other? You know, why can't it be both and I really wanted to respond to be like I agree with you But I didn't because again I thought it was more fun and I knew I was making this video And so I genuinely in the bottom of my heart to all those people I agree with you And so I want you to feel some vindication Some sense of you know, you you you were right and so I hope that this was Hopefully a good outcome for what you were hoping for. I have nothing against our I have used it And I and I've taken a few courses on it I have not used that much art in my actual job Although the data scientists that are in my department use it quite a bit I mostly stick with Python and so again, that's why I like it better But I can honestly say that I've given both a fair chance and so I think that you should do the same I think you really should test out which one that you personally think is better. Thank you guys so much for watching I really appreciate it. If you liked this video, be sure to like and subscribe I feel like it's worth subscribing to I got some pretty good videos. I got a lot of videos coming out soon Thank you for joining me and I will see you in the next video