R vs Python

Поделиться
HTML-код
  • Опубликовано: 23 янв 2025

Комментарии • 387

  • @PerformanceTezek
    @PerformanceTezek 6 месяцев назад +77

    Thank you Toni Kroos. You you gave people the pleasure of watching and now educate people your're pure diamond.

    • @thecontentmaker3767
      @thecontentmaker3767 6 месяцев назад +1

      dayumm bro, fr, I went back and had a look, ong bro, he can fr go viral istg

    • @neelanshguptaa310
      @neelanshguptaa310 6 месяцев назад

      He looks more like Ole Gunnar Solskjaer honestly. Super sub that comes in and scores (explains something so easily to me) after a dull goalless game with nothing significant (me spending days stuck being confused).

    • @Edriclugard
      @Edriclugard 5 месяцев назад

      🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣i was like, where have i seen this face before...seeing this comment made me realize where

  • @guitarislife01
    @guitarislife01 2 года назад +22

    THIS SHOULD BE THE STANDARD. Thank you for actually presenting your findings rather than give an "it depends" answer. Great video.

  • @friendlyoctopus9391
    @friendlyoctopus9391 2 года назад +186

    from now on i'm importing numpy as numpty instead of np

  • @exs0ldiercl0ud7777
    @exs0ldiercl0ud7777 Год назад +107

    I have 10 years working with R and I have never ever had a problem I couldn't solve with it. From ML to basic data analysis and visualization ( I'm a soil scientist). I program in both but I really like R

    • @elvinmustafov7313
      @elvinmustafov7313 9 месяцев назад +1

      is 37 late to become programer want to learn R and python

    • @FrozenFlames243
      @FrozenFlames243 9 месяцев назад

      @@elvinmustafov7313 nope, but you should consider getting good spine inusrance, 40 strugle is real, progamming languges are not flavors they are desing to solove certain issues and make money cough java-script, python is the most easy lanaguage, like you never down the path of programming go for python just to get taste of it, when it comes to data,ml,AI python is go to, but that does not mean R is usesless R is there to solve satiscal learning,visulaization and much more.

    • @EDMisalive
      @EDMisalive 9 месяцев назад

      @@elvinmustafov7313 As he said R is easy to get into. Start with c it'll make easier and give a better understanding and will took few months or just go with R if you have lesser time

    • @elvinmustafov7313
      @elvinmustafov7313 9 месяцев назад

      @@EDMisalive tring to learn R and and Python this was advice and opinion of few programers that i know

    • @ismaeliceman
      @ismaeliceman 7 месяцев назад

      @@elvinmustafov7313 as a general rule of thought personally its never too latge for anything ( maybe it sounds a bit cheesy but I believe it to be quite true)

  • @galatemalate1256
    @galatemalate1256 2 года назад +80

    In personal experience never used R for statistical analysis haha, only for data gathering and cleansing. I’ve been got data from SQL Server, Csv Files, Text Files, GitHub repo metadata, APIs and Point of Sales. For cleansing libraries such as dplyr, lubridate, anydate, stringr, etc, magrittr helps to keep data transformation really clear. Finally once the data is cleaned up and ready, land it to the warehouse.
    My personal opinion is that you can do the same ETL processes in R than in Python even with less code (if you know how to use R properly)

    • @TMRick1
      @TMRick1 Год назад +4

      This is a really underrated usage of R, especially when you have the DBI package able to work with the major open source implementations of SQL databases. I manage a server hosting a lot of Shiny apps that rely on SQLite databases to work properly and the update routine of ETL is done using R scripts running on a daily basis with cronjobs.

  • @labtimeRP
    @labtimeRP 2 года назад +276

    In my opinion, when we talk about Python as a competitor of R, we should refer to it as Python-Pandas. More credit should be given to Wes McKinney to the surge of Python for data science

    • @ultrasoft5555
      @ultrasoft5555 Год назад +28

      Pandas is a disaster. I don't know how it could become an industry standard. Sadly it's very obvious the creators of the video have no direct experience with these tools. Not only missing numpy's name, but saying things like "Python supports csv and json while R support xls" or "Python is good for data wrangling thanks to pandas, while R is good in statistical analysis" -- these are simply not true, absolutely misleading.

    • @josephmargaryan
      @josephmargaryan Год назад +1

      @@ultrasoft5555 so which one is best according to you? python or R

    • @MKgobe
      @MKgobe Год назад +3

      ​@@ultrasoft5555 this is definitely not misleading, Python can actually read json and csv files, web developer's usually use json files, even those using Django use json files. And the pandas library has functions that enable reading csv, I think it's called read_csv or something like that.
      And that guy literally explained what numpty is, that was intentional.

    • @MrPrabhatRastogi
      @MrPrabhatRastogi Год назад +10

      @@MKgobe the idea that python “ONLY” supports those is the problem. Python can read any file format under the sun (specific packages for everything from xlsx to avro, parquet etc ) I am pretty sure python supports more formats simply because it is multi purpose.
      Also - in visualization, the guy has probably never seen libraries like plotly, seaborn etc. Hec, even a package that copies ggplot2 exists in python.

    • @mpfmax0
      @mpfmax0 Год назад +3

      @@MrPrabhatRastogi I recently switched to python from R. I'm by no means an expert, but the fact that he said if you like cool visualizations go for R, made this whole video kind of sus for me, cuz I love visualization and plotly seems to work better in python and seaborn can look even better than ggplot2 imo. Even though coding ggplot2 is much easier than plotly or seaborn, you cannot beat how smooth and nice those libraries look.

  • @stellaobeleagu3419
    @stellaobeleagu3419 7 месяцев назад +6

    On point there, R is my best for manipulation and visualization. In all you do, just learn Python and R.

  • @lazarbaruch
    @lazarbaruch Год назад +4

    For a long time, I haven't seen such an informative presentation. You just made an inventory without explaining how the specific language features make the difference.

  • @davemilnes1147
    @davemilnes1147 2 года назад +25

    May I just say your ability to mirror-write is breathtaking!

    • @IBMTechnology
      @IBMTechnology  2 года назад +15

      I know, you would not believe how much practice it requires. [j/k] Search on "lightboard videos".

    • @muratdogusan
      @muratdogusan 5 месяцев назад +1

      @@IBMTechnology just write normal and mirror the video in post. wouldn't it work that way?

  • @robertrichardson3888
    @robertrichardson3888 2 года назад +59

    I use and teach both. In fact I am teaching one class in R right now and one class in Python. I've also helped establish professional organizations with data science frameworks. This video is actually very in line with what I think. I've had a hard time teaching Python to people who have only used Excel, R is easier. If I'm doing a complex analysis requiring advanced probability concepts, I work in R. But I see why professional companies have leaned more towards Python. Its infrastructure makes Python better for security, reproducibility, consistent AI for apps and machinery, working with streaming, graphical, or network data, and text mining.

    • @jrltown
      @jrltown 2 года назад +3

      My view is slightly different: R and more specify Tidyverse (packages / R dialect) is the clear leader in supporting fully reproducible workflows where the pipeline ends with reporting - reporting includes interactive web applications all the way down to static documents. The Python community has not been as strongly engaged in the reproducibility discussion outside of enterprise execution pipelines. They simply stop before reporting and that stopping point is premature.
      (Edit: typo misspelling corrected)

    • @Kei3th1424
      @Kei3th1424 2 года назад

      Hi Robert. I one of the 'people who have only used excel'. Can you tell learning R is easier for people like me? (Fyi I'm learning phyton as my first language atm)

    • @Mario-gq2xb
      @Mario-gq2xb 2 года назад +2

      @@Kei3th1424 why R is easier? One of my observations is that when in Excel, you're somewhat writing codes when you type out formulas that contain functions. The way u work with data in R is very similar in terms of the functional approach whereas if u go to python the syntax will be a bit more alien with heavier emphasis on object oriented designs and quite frankly a less intuitive way of working with data in pandas especially that makes it hard to learn for first time programmers.

    • @hansisbrucker813
      @hansisbrucker813 Год назад

      What is your take on Julia vs R?

    • @HarmonicaTool
      @HarmonicaTool 7 месяцев назад

      ​@@hansisbrucker813Julia still has to prove mass adoption. R is the successor to S and thus much older then Python and Statisticians publish new algorithms in R whereas Python is taught to many beginners. Both will be around in twenty years. Can you say the same about Julia? There is no doubt that Julia is great in what it does but so were BASIC and PROLOG and Smalltalk languages. If Julia is good for what you do with it today, then go for it. If learning a language is a long time investment of your time and effort, choose something established.

  • @ShawnaAPierce
    @ShawnaAPierce 6 месяцев назад +1

    Funny, intelligent, and not agonizing to watch for more than 5 minutes. Well done:)

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 2 года назад +28

    2:55 Jupyter notebooks can support a range of languages. It started as IPython, which was Python-centric. And while Python is still the foundation and implements the Notebook API, there is a range of kernels allowing you to run other languages in notebook cells.

    • @stearin1978
      @stearin1978 2 года назад +11

      JuPyteR is Ju-lia Pyt-hon and R acronym but... The Jupyter system supports over 100 programming languages (called “kernels” in the Jupyter ecosystem) including Python, Java, R, Julia, Matlab, Octave, Scheme, Processing, Scala, and many more. Out of the box, Jupyter will only run the IPython kernel, but additional kernels may be installed. (c)

    • @trycryptos1243
      @trycryptos1243 2 года назад +1

      @@stearin1978 thanks, informative.

    • @juan.araujonog
      @juan.araujonog 2 года назад +3

      Also RStudio supports programming languages other than R

  • @sinan_islam
    @sinan_islam 2 года назад +79

    You will end up using both, because Machine Learning and Statistics cannot be split apart. Python for ML and R for stats.

    • @acupoftea8635
      @acupoftea8635 2 года назад +1

      the most wise comment

    • @patrickn4171
      @patrickn4171 2 года назад +2

      I use python for stats all the time, works great. I used to use R but I'll probably never go back

    • @ibragim_on
      @ibragim_on 2 года назад +1

      I agree with you

    • @jakubk.2367
      @jakubk.2367 Год назад +1

      Now tell me what is machine learning all about...

    • @HarmonicaTool
      @HarmonicaTool 7 месяцев назад

      I'd concur if Machine learning was only Neural Networks, which for some people it may be.

  • @marcello4258
    @marcello4258 2 года назад +19

    I totally agree on his take.. though python is not only OO but also functional

    • @HarmonicaTool
      @HarmonicaTool 7 месяцев назад

      R is object orientated as well as functional and using both in both languages makes a lot of sense. Do you really think that any of this makes an important difference between these languages? I don't think these are the decisive differences.

  • @auzaluis
    @auzaluis Год назад +9

    Ok. I'm an R user and when he was explaining Python's pros I was thinking R can do the same. It's unfair mentioning Pandas without mentioning Tidyverse

  • @jaffarbh
    @jaffarbh Год назад +13

    I use both in my workflow. Speed-wise, I think Python is about twice as fast for general purpose operations (like for loops), but in practice the performance depends largely on the packages used.

  • @DaveParr
    @DaveParr 2 года назад +23

    Fine up to 5:40, then you lost me.
    The base R language reads CSV and JSON natively.
    Rs equivalent to pandas is tidyverse, except the R base language supports data frame natively. Also data.table and pandas have almost equivalent syntax.
    NumPY is not in the native python language, you Numpty. It's installed as a module.
    No mention of Rmarkdown, Rnotebooks or quarto. It's like jupyter except without the bonkers decision to use JSON as the raw file format.
    No one prototypes in one language and productionises in the other. There's no more certain way to double your time to delivery and halve your code quality.

    • @barodrinksbeer7484
      @barodrinksbeer7484 2 года назад +9

      This is how I feel whenever this debate comes up, a lot of people think R just does 1 or 2 things really well. But, the reality is packages like Shiny, Rmarkdown, and some ML libraries are misunderstood or just ignored for how good they are (community and documentation). Also, I have rarely had problems with learning a new R package that works in the base R code format, because everyone uses a similar coding format. Whereas Python packages are harder to pick apart, because people base their coding formats on different formats.

    • @TMRick1
      @TMRick1 2 года назад +6

      @BaroDrinksBeer Shiny is a criminally underrated part of R, along with Plumber APIs. I managed to create a significant saving for a company by making them cut an expensive PowerBI license and substitute all the dashboards for Shiny on a cloud server. Worked like a charm. Reactive modules with pre trained ML models in .rds files, with a daily retraining routine for the new data using cronjobs.

  • @syhusada1130
    @syhusada1130 2 года назад +14

    Starting with R is better, but for a weird reason, that is: "more incentive to learn python and other things".
    I suspect, most who started with Python are less likely to learn R because they think Python can handle "everything".

    • @GamingShiiep
      @GamingShiiep 2 года назад +7

      For me it's the opposite. I learned programming with R, and feel like Python is much less intuitive.

    • @naybaz7777
      @naybaz7777 2 года назад +6

      Started with Python for Data Analysis. Later tried R tidyverse. Oh dear, i hate python workflow now: pandas, numpy, seaborn - its all feels as an awful crutch

    • @jrwkc
      @jrwkc 2 года назад +1

      I learned R because i loved their dataframe structure. Now with pandas, R can go pound sand.

    • @nifftbatuff676
      @nifftbatuff676 Год назад

      Pandas is an awkward attempt to add dataframe objects in python that resemble the way R works.

  • @francisdelacruz6439
    @francisdelacruz6439 2 года назад +15

    Specialists usually go for R Economists, Biologists, Epidemiologists et al, those whose domain knowledge required statistics. In economics there is no question you go for R due to the packages for economics. If stat and associated data is a means to an end then it's R. If your a programmer who primarily collates and collects data with basic processing then likely it's Python.

    • @MrMaxtng
      @MrMaxtng 2 года назад +2

      What a biased opinion. "Cool people use R. Python is for programmers who do basic shit" lmao

    • @Brien831
      @Brien831 2 года назад +1

      @@MrMaxtng No its true. Any job focusing heavily on data analysis will have you using R. Where I live any actuary has to know R…

    • @victorst5997
      @victorst5997 2 года назад +4

      This is correct. We work with chemicals and design experiments all day long for optimization purposes. R has so much functionality and and what we chemists know as packages. The science behind our chemical technology is deeply rooted in research work based on Response Surface Methods and Mixture Designs. We're no programmers. We're scientists. And we analyze our data and design our experiments with R.

    • @fij715
      @fij715 Год назад +1

      @@MrMaxtng It is literally the case though.

    • @fij715
      @fij715 Год назад +1

      @@victorst5997 R is also used in Biology and medicine.

  • @jrltown
    @jrltown 2 года назад +71

    For data exploration in R, the {dplyr} and {tidyr} packages are excellent for sub-setting and wrangling. I think this approach is superior to pandas in python. In fact the grammar and semantic approach to data wrangling enabled by {dplyr} is a foundational reason to use R over python (i.e. pandas). These two libraries (dplyr, tidyr) along with {ggplot2} make up a core of the Tidyverse approach to using R. This approach is so well thought out that it often makes me chuckle when people suggest or argue that python is better.
    Clearly there are cases where python is better, just as there are cases where R is better. But when it comes to analytics and reproducibility I've not yet seen a dispostive argument in favor of python.

    • @BingbongRecto
      @BingbongRecto 2 года назад +5

      Python is much better for readability. It's too easy to write opaque R code. Python also has features like dictionaries, comprehensions and lambda functions that make coding more pleasant.
      R also sucks with data outside of dataframes. Matrices are much harder to work with than numpy arrays.

    • @cweymouth1
      @cweymouth1 2 года назад +8

      Tidyverse is a collection of libraries. It isn't even right to compare Pandas to Tidyverse. In this respect, you'd be better off comparing Tidyverse to Anaconda. It's really just a weird claim when matplotlib, pandas, numpy, seaborn, scikit learn, pycaret, yellowbrick all have just have incredible documentation. Not to mention, the combination of "Read the Docs" and "Sphinx" make open source package documentation a breeze. Why? Because good programming requires good inline documentation. Both of these tools make it incredible easy to take your inline documentation and build/distribute it to the open source community. It's just weird to say python libraries don't have great documentation when its just wrong.
      A preference for functional programming through dplyr and tidyr is not enough to say "R is better for data analysis." In Pandas, there too is support for a more functional approach through the pipe method. Additionally, dplyr and tidyr combined do not have anywhere near the amount of methods available for data manipulating. On a more important note about Pandas pipe, it allows for user defined functions for applying transformations on dataframes or series. Why is this important? Because it provides better encapsulation, more options to the developer, and improved readability. To be clear, you cannot, out of the box combine dplyr's (or tidyr) select, mutate, groupby, ect with a custom function via the pipe operator. dplyr has a not so friendly work around for providing this functionality where the user needs to google search through and figure out that they need a parameter called ".data" which is something very specific to dplyr's implementation and not at all obvious. This is a huge limitation when it requires the developer to take their work to a production setting. Or, even more simply, share their work with others and debug their code themselves.
      Don't even get me started on the data-masking that the tidyverse paradigm has created in the R community. While it makes data operations more concise, it comes at the expense of polluting the name space of the environment making the developer blind to what variables have been created in global scope increasing the risk of collisions.

    • @AWest-ns3dl
      @AWest-ns3dl 2 года назад +10

      Use the one you know.
      I don't find R much better for stats than scipy, or ggplot better than seaborn. But I do find python better for environment management, package development, and none data science projects like webscraping.

    • @jrltown
      @jrltown 2 года назад +12

      This is me, chuckling. I imagine I've seen a proportionally equal amount of opaque and unreadable python code as you may have seen opaque R code. I also imagine, and you might agree, that good coding is partially art and partially experience. So, if you have a language that is good for beginners, you're probably gonna see some bad code written in that language. no?
      Anyway, Yes, you can write anonymous functions in R -- totally can. Chucking again that the claims, without evidence, about python dictionaries , comprehensions, or matrices are supposed to be dispositive in favor of python. At best it comes down to use-cases. But really, OP's comment -- "choose the language of your community" -- is spot on.
      There seems to be no end of python-fan vituperative comments using straw-man criteria meant to express strengths when they actually express personal bias -- typically expressed alongside often outdated and just-plain-wrong claim about R.
      In any case, my comment was aimed at OPs comment about R's utility in data exploration. My position is that R (AND Tidyverse) is clearly better than OPs video suggests (somewhere in the middle-end of the video timeline). Beyond that, OPs recommendation to use R for beginners AND advanced is insightful to say the least. Clearly a strong and sound suggestion.
      Meanwhile, I can't stop chuckling at this response. I mean, just no. But, look, it's totally fine to have a preference. Not convincing, but if you're community digs Python, keep doing you.

    •  2 года назад +9

      @@BingbongRecto R's equivalent functions to Python's lambda functions are: apply, lapply, sapply, vapply, tapply. Followed by mcapply (multi core apply i.e. parallel processing).

  • @AlanCringLtd
    @AlanCringLtd 11 месяцев назад +1

    I started this video being confused about which to learn and use. The rest of the video (until the end) left me still confused but with more information to justify my confusion. If I understood the very end correctly, I should learn and use both.

    • @HarmonicaTool
      @HarmonicaTool 7 месяцев назад

      You should consider what your team does and what you plan on doing. If in doubt, learn the more General Use language first.

  • @phantastik3389
    @phantastik3389 Год назад +2

    You can use both for big data applications. It's really base on preference

  • @kayakMike1000
    @kayakMike1000 2 года назад +9

    Python sure has OOP support, but doesn't force you to use them. It has some pretty good functional support also, but again, not forced to use them.

    • @franciscoflamenco
      @franciscoflamenco Год назад

      The thing about Python is that it completely half asses both the OOP and functional paradigms, meaning that while being multi-paradigm in theory, I think most Python programmers are better off sticking to good procedural code with common sense applications of other paradigms.
      Note that I'm not saying that's a bad thing. There's a reason Python is my go to language.

    • @lysithea9293
      @lysithea9293 Год назад

      R also has OOP systems: S3, S4, S7, R6, etc. R6 is the equivalent to classes in Python.

  • @MagnusAnand
    @MagnusAnand 2 года назад +14

    The good thing about Python is that I can create a model and also a backend service to serve it with one language.

    • @borisn.1346
      @borisn.1346 2 года назад +4

      it can be done in R too - what's your point?

    • @vadergrd
      @vadergrd 2 года назад +4

      @@borisn.1346 but you wouldn t want that!

    • @einstein_god
      @einstein_god 2 года назад +7

      Why would would I run a backend application in R😂 when fastapi and django rocks

    • @yaroslavtsevam
      @yaroslavtsevam 7 месяцев назад

      @@einstein_god yes fastapi is great for modelling.

    • @HarmonicaTool
      @HarmonicaTool 7 месяцев назад +1

      The answer to this post has certainly changed with the advent of Shiny and then again with the advent of webR. We should all get used to the two languages growing closer together.

  • @FAAAx2
    @FAAAx2 2 года назад +20

    The main difference is that Python is a general purpose language and R is a niche language. R was not created to be used for computer scientist, it was created to help other scientists do their computer stuff.
    On the other hand, Python is more focused on computer scientist but also in general public that maybe just want to do a simple script to automate boring stfu.
    It is difficult for a language to be better than other one, they normally just are designed for different purposes.
    In my case, as software engineer, I feel more confident with Python. But this is because I, normally, don't have to do specialized analysis about and specific field as economics, biology, etc. For this reason pandas, spark or others are enough for me an I am able to write other utilities (such as parsers, command line interpreters, etc.) that I need in my application (that is a software used by someone else, not a paper or an analysis).

    • @fij715
      @fij715 Год назад +1

      R is used on the financial sector and auditing. With R you can make complex statistical analysis.

    • @gabrieldacruz9796
      @gabrieldacruz9796 Год назад

      I'm learning it by myself and I feeling certain difficult to handle this larger range of applications. Do you've knowledges about other data tools?

  • @larryfishermanjr.8323
    @larryfishermanjr.8323 Год назад

    Hahah (2:09) clearly the best speaker from IBM. Sympathetic man and instructive content, gladly more

  • @Kivrus
    @Kivrus 8 месяцев назад

    R is the best for for data analysis: any adhocs, visualisation, any work related to work with data tables / frames
    Python is good for complicated apps and etl
    In python you need to spend way more time writing code for the same analytics tasks
    Regarding CSV files - it is even easier to work with CSVs in R

  • @silerius4856
    @silerius4856 Год назад +5

    I recently started learning R for a "Quantitative Business Analysis" course I'm taking for my MBA. Really wish I knew about R when I was studying chemistry for undergrad. Thanks for the video!

    • @neroetal
      @neroetal 5 месяцев назад

      Me too learnt about R 3 years after doing my post graduate masters 😢😢😢

    • @gianluca.pastorelli
      @gianluca.pastorelli 17 дней назад

      @@neroetal I learnt R in the middle of my career as a researcher... I felt like I was born a second time 😄

  • @InssiAjaton
    @InssiAjaton 2 года назад +2

    Earlier this year, I searched for any language among the recent public favorites that would support reading fresh data from measuring instruments. I mean direct hardware port connectivity. Tough task! All of them seemed to be happy to just start manipulating already existing data, Excel and such. The third book I read about Python mentioned there is a library to provide port connectivity, but did not really elaborate. My old favorite, FORTH dropped out of competition when Windows started denying direct access to hardware. Quick Basic worked for a while longer. And after that, you needed drivers, possibly provided by the instrument supplier, if you were lucky. That is what Visual Basic depends on.

    • @HarmonicaTool
      @HarmonicaTool 7 месяцев назад

      That sounds like a C++ job. You can use C++ inside your R Code with the RCpp package and similar things will probably exist for Python. Nevertheless, there are places for compiled languages even in modern times.

  • @vizak90
    @vizak90 Год назад +3

    Matplotlib and seaborne libraries can be used for data visualization in python. Heat maps, bar, gant chart

  • @icstatonato
    @icstatonato 2 года назад +9

    I can't understand why nobody talks in theese debates that R's data.table syntax is basically the same as python's pandas, with the gigantic upside of requiring half the amount of code to perform the same task.
    While I get that R is a specific language, while python is general porpouse (and thus have a much bigger community), people always make the completly subjective point that "python is easier to learn, much easier syntax". I can only imagine that this kind of mindset comes from people that believe that R has no options besides its base implementation (while simultaneously assuming that numpy and pandas comes as default).
    Tidyverse R is basically as clear and friendly as SQL ("select", "group by"...). There is no way that pandas is more newbie friendly than this for python to be the "go to language from data exploration" and, even if thats the case, once again, R data.table is very similar and requires much less input.
    With all that being said... I use both languages, and although my preference is clear, there are some situations where one is better suited than the other. I think they should be treated more as complementary than rival tools.

    • @Kivrus
      @Kivrus 8 месяцев назад

      Agree
      R data table is my choice
      Python pandas is just terrible if we talk about amount of the code you need for the same operations

  • @olexiypukhov-datascience2046
    @olexiypukhov-datascience2046 2 года назад +7

    Not true. I do the entire end to end process using R. RSelenium for scraping information. Tidyverse for cleaning data and exploratory data analysis. Tidymodels for machine learning. Shiny for production and putting the analysis on the web for other people.

  • @2002budokan
    @2002budokan 18 дней назад

    For early analysis use R, then transport your work to Python, then optimize the result with C.
    In this context I would use Julia from start to the end.

  • @shashank.c
    @shashank.c 2 года назад +6

    He can write mirrored letters so freaking fast! 🤯

    • @Alexander91
      @Alexander91 2 года назад +9

      Maybe the video was flipped

  • @thezachdrake
    @thezachdrake 2 года назад +2

    It's long time we add Julia to these conversations. The "Ju" in "Julyter Notebook" literally stands for Julia.

  • @SwordFighterPKN
    @SwordFighterPKN 2 года назад +10

    I found R to be really difficult since it does not follow traditional programming logic, since it is very math based.
    Do enough years of C++, Perl, Python, C, Java etc... R just seems weird

    • @fij715
      @fij715 Год назад +8

      R uses actual logic.

    • @aephidayatuloh
      @aephidayatuloh Год назад +1

      R was created with the aim of making it easier for humans or data analysts to perform computations, not to make it easier for computers to do their job. So, the logic more closer to human. For example, index start from 1 like you start count from 1, right?

    • @HarmonicaTool
      @HarmonicaTool 7 месяцев назад

      Some may think R is weird for there is no variable type that can contain only one number, others may think Python is weird for the lack of curly braces around blocks. None of these are real obstacles in learning a programming language.

  • @31807ccc
    @31807ccc 2 года назад +10

    I have used both R and Python professionally. Here’s my take. R is for SMEs (not programmers). Python is for programmers. That said, you can mostly use both for the same job. The difference between them only becomes significant at the edges.

  • @chenzhao433
    @chenzhao433 7 месяцев назад +1

    true, both should be learned. if you have some knowledge in one language ,the other one isn't a big problem. so just do it!

    • @HarmonicaTool
      @HarmonicaTool 7 месяцев назад

      Or learn just one of these and then something different such as C++, SQL, HTML/CSS, a Shell, VIM or Emacs. Anything that has less overlap and thus brings more new things to the table!

  • @alexandrodisla6285
    @alexandrodisla6285 2 года назад +12

    R has no competition towards academics research and statistics. The statmodels framework is not mature enough. Visualization, GGPLOT2 (R) is more interesting. After that, R and Python are mostly even. With QUARTO CLI and reticulate, you can work with both.

    • @GabeNicholson
      @GabeNicholson Год назад +1

      I mean except for the fact that Python can be used to build massive code bases and complicated infrastructure easily, then sure, they are even... Ever wonder why a lot of companies use Python for their code base and nobody uses R?

  • @TexasBoyDrew
    @TexasBoyDrew 2 года назад +6

    Haha, we hear so much about Python that goign towards R feels awkward. Great video :)

  • @aalb1970
    @aalb1970 11 месяцев назад +1

    Python is easier to pick up for a complete beginner IMO. I would definitely pick Python first and then learn R later if needed for more complex statistical analysis.

  • @stilltoomanyhats
    @stilltoomanyhats Год назад +6

    What's the pirate's favourite programming language?
    You think it would be R, but their true love be the C.

  • @sephiroth7818
    @sephiroth7818 17 дней назад

    I'm a Data Engineer that doesn't use AWS. I use both Python and R. I use Python for automated data tasks and R when I am not doing an automated task.

  • @OlDirtyBrewer
    @OlDirtyBrewer 3 месяца назад

    Wow Martin, I always thought of you as a "master homebrewer". Now I know you're a "master inventor" too!

  • @tatsuhitot
    @tatsuhitot Год назад

    Popular data visualisation libraries such as Seaborn, Matplotlib, Plotly and several other specialised ones are fantastic.

  • @thisisamirv
    @thisisamirv 2 месяца назад

    Have used both for years. My first choice is definitely Python. Running a parallel processing task in R is a nightmare, and I have faced extremely strange bugs in the process. Not to mention that doing vectorized coding is also not as straightforward in R as in Python. But unfortunately some advanced statistical packages for certain types of data (like single cell genomics) are not available or not very sophisticated in Python. It’s not exactly a problem of Python, but it’s because most analysts use R and thus, develop statistical packages for R mostly.
    So, overall, I really don’t like jumping from one to another all the time, but I usually have to do it anyway. However when possible, my first choice is Puthon

  • @nafishaider
    @nafishaider Год назад +10

    "You might be expecting a it-depends answer, but no, I'm going to tell you exactly which one to pick" - and then proceeds to give different scenarios for picking each one, in other words IT DEPENDS!

  • @ngocbinhnguyen8073
    @ngocbinhnguyen8073 2 года назад +22

    If you use R before Python, R is better. If you use python before R, Python is better. I love all, and use both in my works.

    • @hugowesley4074
      @hugowesley4074 Год назад

      I'm currently learning Python for automation stuff and want to know R only for data analysis. Is this the best approach in your opinion since you know both.

    • @houseplant1016
      @houseplant1016 Год назад

      ​@@hugowesley4074 If you learn python first

  • @djangoworldwide7925
    @djangoworldwide7925 2 года назад +4

    I have to point out that when you talk about data exploration and don't mention the tidyverse for R it feels a bit lacking... As an R user, I must say that starting with Python is probably better since it's more broadly used and integrates better with other languages, as well as software developers that are using different methods, while R needs to be recompiled in order to work within the organisation

    • @kristopherwilson506
      @kristopherwilson506 Год назад

      Was looking for this comment about tidyverse. As a statistician, I first learned python because of its general use and overall simplicity. Both are good for beginners either way. Then moved to R for more advanced work. And the more general and computer science-y I go, the more python I use

  • @nilesoien7867
    @nilesoien7867 2 года назад +203

    R is under rated I think.

    • @andreypetrov1327
      @andreypetrov1327 2 года назад +12

      Python borrowed a lot from R

    • @drivers99
      @drivers99 2 года назад +17

      Rated R

    • @kayakMike1000
      @kayakMike1000 2 года назад +3

      Python is a great glue language.

    • @akbarkhan-nq3xl
      @akbarkhan-nq3xl 2 года назад +1

      No it's not.
      It's just very specific.

    • @cristiancardona2560
      @cristiancardona2560 2 года назад +14

      Well...if you need to do statistical tests in Python, you'll be suffering.

  • @jamesjose7925
    @jamesjose7925 2 года назад +9

    Thank you for this very calm and useful presentation.

  • @serhatakay8351
    @serhatakay8351 2 года назад +5

    I mainly use R for shallow models but as i need neural networks and beyond or other deep models, i switch to python

  • @MySmith1234
    @MySmith1234 2 года назад +11

    I use R everyday as a data scientist at my current job for a year now! In my precious job, we used python!

    • @fij715
      @fij715 Год назад

      And which do you prefer?

    • @squabble3332
      @squabble3332 Год назад

      please take a word about R ,
      now im try to start with it, and have a bit doubt of my choice

    • @stegosg
      @stegosg 6 месяцев назад

      What a nice video to be like and share.

  • @prabpharm07
    @prabpharm07 Год назад +2

    Dont agree that R is more suited to process Excel files. 70% of the times I import CSV. Its designed to process, Excel, CSV, txt, JSON, and many more formats.

  • @chriskarnes3410
    @chriskarnes3410 2 года назад +11

    It's just as easy to work with API calls and JSON in R. I don't have to worry about switching condas in python environments because subversions of packages work for one application and not another. When actually developing code against data it's hard to beat the RStudio IDE.

  • @shimmeringreflection
    @shimmeringreflection 2 года назад

    Wow, I could listen to your soothing voice all day 😊

  • @JMann-pd2vg
    @JMann-pd2vg 9 месяцев назад

    R is the best programming language as far as data related work is concerned. I have worked with both, python and R and have R to be better for Data related tasks, may it be machine learning, data science, data analysis or visualizations.

  • @heinsaar
    @heinsaar 2 года назад +12

    1:18 see what he did there?

  • @rustedrootbeer
    @rustedrootbeer 2 года назад +1

    Pure shock that the guy behind my favorite homebrewing channel works for IBM!

  • @yahampathmarambe8879
    @yahampathmarambe8879 2 года назад +3

    this video making is awesome, and I use both as my teams requirements

    • @IBMTechnology
      @IBMTechnology  2 года назад +2

      Thanks for your comment. We strive to make videos that mean something to our audience - and when we make mistakes we make light of those. #human

  • @jeremycompton3010
    @jeremycompton3010 10 месяцев назад

    Brilliant, l loved the explanation. l believe l will be learning R. lm using this for my learning of Business Analysis and my data analysis study.

    • @HarmonicaTool
      @HarmonicaTool 7 месяцев назад

      If you need strictly data analytics, R is a great choice!

  • @MrMarvinnio
    @MrMarvinnio 5 месяцев назад

    Accepts misspelling of "Numpy"👏
    Proceeds to misspell "Jupyter"😂
    Awesome and highly needed comparison tho!😏👍

  • @TheSense13
    @TheSense13 2 года назад +9

    How is he writing backwards so good?

    • @Smellythief
      @Smellythief 2 года назад

      Came here to say this, that this video is obviously just an excuse to show off his backward writing.

    • @Yamoukawchowa
      @Yamoukawchowa 2 года назад +10

      The video is probably mirrored. I assume he is right-handed.

    • @ecubere
      @ecubere Год назад

      It's a mirrored image

  • @taisa_araujo
    @taisa_araujo 5 месяцев назад

    What a great video!! Thank you!

  • @slytilex
    @slytilex 2 года назад +14

    just use both people. No need for competition, these are 2 very useful tools

  • @VLADrusLV55
    @VLADrusLV55 2 года назад +8

    I wouldn't forget about MatLab. I often see how some researchers use it in ML, DS and ANN.

    • @monkeyofwar6818
      @monkeyofwar6818 2 года назад +6

      But that's a lot of money. Mastering a language only to lose it because no one is paying for the license is a bummer.

    • @matej6418
      @matej6418 Год назад

      Hahahahaha no one heard of Matlab for 15 years at least. Approx 5 scientists use it all together.

    • @regretandtears
      @regretandtears Год назад

      scilab is a good open source alternative

    • @nifftbatuff676
      @nifftbatuff676 Год назад

      R and Matlab are both natively vectorial languages. And this is a huge bonus. Python is scalar.

  • @CesarRodriguez-ws8hg
    @CesarRodriguez-ws8hg 10 месяцев назад

    I used to hate R, but I started having fun with it when I used it for my thesis

  • @makankananian3838
    @makankananian3838 Год назад +1

    This man knows nothing about Python, I assume. Visualisation is so hard and complicated in R. We are talking about Python 3.11 these days. It is a master piece that can do anything in datascience. You can do nlp using nltk, linear algebra using numpy, any kinds of data manipulation or .csv .txt data reading or writing using pandas, visualisation using matplotlib or seaborn, anything can be done using python and maybe you cannot believe it but the result is even much better

  • @satenderkumar9516
    @satenderkumar9516 2 года назад +1

    how many months expert in these both language?

  • @therendra
    @therendra 11 месяцев назад +1

    do R support big data ?

    • @Kivrus
      @Kivrus 8 месяцев назад +1

      lol of course and works much better with it

    • @HarmonicaTool
      @HarmonicaTool 7 месяцев назад

      Everyone has their own definition of big data. If you mean "bigger then RAM" data - yes, R has you covered. If you think of Petabytes, then there are no simple answers. Nothing will deal with that "easily" but who does ever get to process really big data without the database selecting only parts of the data first? Everyone talks about big data but almost nobody ever has to deal with it.😂

  • @andreinita1367
    @andreinita1367 Год назад

    I think Python is a better way to start as a beginner than R. Plus, is easier implemented in tools like Spark and web-development.

  • @neroetal
    @neroetal 5 месяцев назад

    Im using both... Python for personal work and hobbies with data while i use R for assignments lol ...
    I love both and found that python will require few libraries like less than 10 to get any statistical job done while R will require more than 100 tools of libraries lol😂😂😂

  • @catdandel
    @catdandel Год назад +3

    Having 40 years of programming experience and having had learned R before Python, I beg to differ (somewhat). Yes, tidyverse is superior to Pandas, but only as long as you hard-code your variables. Yes, there are more statistical functions for R than for Python, but Python is catching up fast. I use statsmodels and, at least in my work, it can do anything an R library could. R is easier to use for elementary tasks, like performing a t-test (it's a one-liner in R), but as soon as you do something more complex, it is easy to get lost in R. Similar for graphics: Basic plotting is easier in R, but, to get the plot look as _you_ want it (as opposed to 'as the computer wants it'), Matplotlib and Seaborn beat ggplot any day. Python is easy, logical, systematic, orthogonal, elegant... In R, there are several libraries for computing the ROC curve and none is really satisfactory, In Python, you use sklearn and it works like charm. I could go on like this forever...

    • @aephidayatuloh
      @aephidayatuloh Год назад +1

      "In R, there are several libraries for computing the ROC curve and none is really satisfactory, ...", you want to try tidymodels?

    • @Kivrus
      @Kivrus 8 месяцев назад

      40 years and you know nothing
      Good job lol

  • @inomo
    @inomo 2 года назад +4

    What about Julia?

    • @HarmonicaTool
      @HarmonicaTool 7 месяцев назад

      Only time will tell if investing Julia is worthwhile. For now it is an interesting prospect with unclear future. It is great if it does exactly what you need now or as a hobby.

  •  7 месяцев назад

    how does the trick with the pen work? thanks

    • @stegosg
      @stegosg 6 месяцев назад

      What a nice video to be like and share.

  • @JonGretarB
    @JonGretarB Год назад +3

    Have to use both. When it comes to graphing R is by far the winner. When it comes to statistical work it becomes very obvious that R was designed to do this. While Python has the problem of dataframes not being a first class datatype which gives you messy and ugly code when you need to make scikit-learn talk to numpy to do just a simple regression.
    Python wins in the bigger stuff. Large, and complicated machine learning stuff. However with the new Nx, and related, libraries in Elixir we might have a contender that might blow Python out of the water soon.

    • @matej6418
      @matej6418 Год назад

      Bahahahahahaha. Aaahahahahahahagabaha
      Can't stop laughing lol. Serious ml frameworks/ optimization tools: Torch, Jax, pyro all in python and more every day. Hardly anything in R. Mlops tools: mlflow, airflow, spark all python native. Some small section of support for R sometimes lol. And dont let me start with IDEs. rStudio feels like a tool from 1999. Chatgpt, good got support. Nothing there. rStudio is a joke, worst IDE I have ever seen. R is inconsistent with "quirks" a.k.a. shitty design no wonder CoPilot and ChatGPT have trouble understanding it.

  • @gotfan7743
    @gotfan7743 2 года назад +10

    Anyone who criticizes R language should be sent to the wall.

  • @blitzcrank7554
    @blitzcrank7554 Год назад

    Wait, python can also be used for data viz , seaborn , matplotlib and etc to name a few.

    • @JonGretarB
      @JonGretarB Год назад +1

      Yeah. But that is true for every programming language. I use both but R is just WAY stronger in this area.

  • @Shadow_fighter-123
    @Shadow_fighter-123 27 дней назад

    As a Biostatistician student, we are trained to specialize in R more than python

  • @antoniocastan9229
    @antoniocastan9229 9 месяцев назад

    I think it just depends on the the problem you want to solve. I personally like R for statistics

  • @MrAehtsham
    @MrAehtsham 2 года назад +1

    Very nicely explained.

  • @jonminton3574
    @jonminton3574 Год назад +1

    I guess the question of which is older depends on whether you consider S to be ‘proto-R’ or something else entirely

    • @HarmonicaTool
      @HarmonicaTool 7 месяцев назад

      No, there is no question that R is merely an implementation of the S language and thus the older language. The video is just wrong about this. I do not feel that being older is an advantage in a programming language. As a matter of fact R carries a lot of clutter from it's age and I envy the Python people who dared to start anew with Python 3.

  • @tingshengquan604
    @tingshengquan604 2 года назад +1

    I think as long as you are not going to the machine learning page, definitely use R as a data scientist, for now.

    • @aephidayatuloh
      @aephidayatuloh Год назад

      Why? You can also do machine learning in R (i.e tidymodels package). For deep learning Python is better with tensorflow and keras.

  • @HoraceMash
    @HoraceMash 2 года назад +1

    Nice vid. Thanks. Beware pandas’ current treatment of missing data though, where the sum of NaNs becomes 0.

  • @VKjkd
    @VKjkd 2 года назад +1

    Very good breakdown

  • @Alexander91
    @Alexander91 2 года назад +1

    I expected a "well it depends kind of answer", and I got a "well it depends (on the following questions) kind of answer".

  • @ammarparmr
    @ammarparmr 2 года назад +13

    I prefer R to Python for 3 main reasons:
    - The pipe operator in R makes codes much easier to built & read (more intuitive)
    - we just have to import the libraries at the beginning and we don't have to call them to use one ot their functions
    - indexing start from 1 not 0(crazy)

    • @Brien831
      @Brien831 2 года назад

      Indey N_0 is simply superior to N_>0. As a mathematician, Indexing over the natural numbers starts at 0.

  • @Leo-hi8bu
    @Leo-hi8bu Год назад

    These are very abstract generalisations. I do data analysis in genomics. I that area I have to use both R and Python. One is not enough

  • @Jamie-il1qu
    @Jamie-il1qu 2 года назад

    Nice presentation, from the homebrew channel guy?

  • @brentallen5378
    @brentallen5378 2 года назад

    This is not biased for R at all. Man, how more obvious can you get?

  • @UNXJUNK1E
    @UNXJUNK1E 2 года назад

    Thank you. loved the video.

    • @stegosg
      @stegosg 6 месяцев назад

      What a nice video to be like and share.

  • @Echo_Emotions
    @Echo_Emotions 7 месяцев назад

    that ka numpty expanation of that guy just coming from the dark side just made my night aaaaahhhhhh

  • @igorbatista6902
    @igorbatista6902 2 года назад +1

    Great Video!

  • @eristonmansambu8225
    @eristonmansambu8225 2 года назад +10

    "There is a healthy debate raging over the best language for learning data science. Many people believe it’s the statistical programming language R. (We call those people wrong.)", said Joel Grus in his book "Data Science from Scratch: First Principles with Python". - I am currently reading the book and when I arrived at the quote, I coulnd't stop laughing on my own. That being said, I'd still choose Python, though💁‍♂

    • @Kersich86
      @Kersich86 2 года назад +9

      from scratch... starts every script with import numpy as np 🤣

  • @vitriowibisono2875
    @vitriowibisono2875 2 года назад +3

    I will go definitely for JULIA

  • @halecj1
    @halecj1 7 месяцев назад

    I always start with R and if I need any help from Python I can just load a helper .py file in my R code and call the Python functions I need directly from R.

  • @rng1160
    @rng1160 Год назад +4

    I used R as part of society of actuaries certification program and I did not appreciate the time wasted on R. if you plan to do "something", really anything with your data, such as serving them on a website, storing them to a database, making it into part of pdf / word / excel / powerpoint programatically, start with python. R shares the same packages as python tbh but the choices and updates are just not there. it is certainly a pain to get started with package management in python but you will thank yourself later for learning a language that is so versatile. R may be a decent language in and of itself but you will reach a bottleneck pretty soon and have to relearn python.

  • @Kivrus
    @Kivrus 8 месяцев назад

    I see no one even mentioned how good poltly in R compared to plotly in python
    So much easier

  • @jamespeterson7979
    @jamespeterson7979 2 года назад

    It's difficult to google for 'R' readings 😉

  • @fidelemmanuel5989
    @fidelemmanuel5989 Год назад

    R can import JSON files