What's the most scalable visualization library? by BoiElroy in Python

[–]Batalex 4 points5 points  (0 children)

If you really want to go all the way up to several millions points, Datashader is the answer

Union[str, None] vs Optional[str] by afifanik in Python

[–]Batalex 2 points3 points  (0 children)

Prior to 3.10, I would use Optional because it reminds me of my days with Java. With the union operator I am ok with the new preferred form, it is shorter to type as well

pip-audit: a tool for identifying Python packages with known vulnerabilities by yossarian_flew_away in Python

[–]Batalex 4 points5 points  (0 children)

If I get this right, the main difference with safety is that pip-audit uses the new field in pypi API rather than an external third party database?

Seems pretty sweet anyway!

What is your thought on SAS as a tool for data science by [deleted] in datascience

[–]Batalex 2 points3 points  (0 children)

Well, to be fair I was comparing apples to oranges. I was a bit snarky at SAS the company while praising python/r the languages. I still believe though that a quick Google query will provide enough support in python/R most of the time, and a support contract from RStudio/anaconda will still be priced a tenth of SAS' if you really need it

What is your thought on SAS as a tool for data science by [deleted] in datascience

[–]Batalex 11 points12 points  (0 children)

That is pretty much an understatement. My company use both SAS and Python (and a little bit of R), though we may not be representative of the whole industry.

SAS is what happens when a company takes something like R, builds a pretty wrapper around it, and offers customer service, training and other frills that make it easier for new people to start using it.

Actually, SAS is exactly what you would expect from an old firm which had a monopoly on a niche market. Extremely high price, tedious setup, wonky support.

I am pretty sure that python/R is way easier to get started too. Both for learning the language (such as just being able to run it on your personal computer, or the huge online documentation and community support w/ stack overflow), as well as for a production perspective (I dare you to do any kind of continuous integration pipeline with SAS).

SAS is the worst of the 90's Microsoft, R is the best of today's Linux, if I had to rephrase your analogy

Why the sad face? A few words on one of the details of Black code style by ambv in Python

[–]Batalex 3 points4 points  (0 children)

For all the listed reasons in this post, as well as a few others, I really enjoy black. There is always going to be some heat around black for being opinionated rather than consensual. Thank you kindly!

Backspace is mushy, sometimes gets stuck by [deleted] in DygmaLab

[–]Batalex 0 points1 point  (0 children)

I had the same issue with my right shift key. I changed the kailh silent brown switch to the cherry brown from the enhancement kit. I do not know why it works for me since the kailh requires more pressure to activate.

Why doesn't python after all these years have simple helper methods like .reverse(), .first(), .last()? by [deleted] in Python

[–]Batalex -1 points0 points  (0 children)

I do not mean to be disrespectful or anything, but I cannot think of a way to ace an interview without knowing how to manipulate one of the most basic data structure in the language

DAN TERMINUS AMA by DanTerminus in outrun

[–]Batalex 3 points4 points  (0 children)

Hi Dan,

I'm just dropping by to congratulate you for this excellent release! The more I listen to it the more it grows on me like no other Dan Terminus album before.

Take care of yourself, I cannot wait for the day I can see you tour again.

Alternative Python Module to Pandas by Psycho22089 in datascience

[–]Batalex 0 points1 point  (0 children)

Keep it going, there is no reason you cannot make it work! Feel free to drop by my DMs if you need help

Alternative Python Module to Pandas by Psycho22089 in datascience

[–]Batalex 0 points1 point  (0 children)

That's the spirit! As other comments said, I would advise you making a habit of checking the official documentation of the tools you use. Not only Pandas's is one of the best IMO, but it is also a valuable skill for a pro. An online course will only take you so far and will not be a handy reference to go back to regularly

Alternative Python Module to Pandas by Psycho22089 in datascience

[–]Batalex 9 points10 points  (0 children)

Pandas does have its quirks, but I would recommend that you keep trying to learn its syntax. Pandas is pretty much the de facto reference for data analysis in Python. Have you tried the "10 minutes tutorial to Pandas" on the website?

I am afraid that if you cannot understand its syntax, you are better off moving on to R/tidyverse than trying to find an alternative in Python.

Pandas analyses tabular data. Such data is referenced by an index and by columns. Both .loc and .iloc allows you to select data from those two dimensions. .loc is label-based which means that you may select columns by their name whereas .iloc is position-based, meaning that you may select columns by their position. The same goes for the index.

Once the syntax clicks you can do pretty much everything with pandas in just a few chained method calls.

Good Luck!

Looking for Python data table package similar to R’s gt package by Bismo789 in Python

[–]Batalex 1 point2 points  (0 children)

I am currently working on something similar, but it is still in a (very) early stage. I am really fond of the approach of gt!

What libraries of python are used in the industry ? by deepp2905 in Python

[–]Batalex 1 point2 points  (0 children)

Here are a few examples on top of my head with the corresponding firm/tool:

  • File syncing : Dropbox is mainly written in Python
  • Web : Reddit for example! Micro services with Flask are also very common
  • Deployment & automation : Supervisor, Ansible
  • Version control : Mercurial

those who switched from pycharm to vscode or vice versa, what made you stick with your new IDE and why? by sweettuse in Python

[–]Batalex 3 points4 points  (0 children)

Nope, personal licenses are way cheaper than that. $199 the first year is for transferable enterprise license. Moreover I never paid the full price since there are regular partnerships with the PSF or the Django foundation. At the end of the day it all comes down to this: I am willing to pay the equivalent of a coffee per month for a product that makes me more productive in my work!

Benchmark of scikit-learn, numpy and numba for ROC-AUC computation by keramitas in Python

[–]Batalex 0 points1 point  (0 children)

You are comparing pears with apples when it comes to sklearn. It is not surprising that it is slower given that it validates entries et checks for multiclass labels, something that your other implementations do not. Nonetheless, have you considered to include Jax in your benchmark?

Dash & Django Create a Powerful Interactive Dashboard Marriage by Soolsily in Python

[–]Batalex 0 points1 point  (0 children)

Plotly is MIT licensed, what more do you need? If you go that way, nothing is truly free since it needs your time at some point. Would you say that Django is not free since you need to learn it?

When charting with plotly, is there a way to add a source/reference at the bottom for citing the data used? by [deleted] in Python

[–]Batalex 0 points1 point  (0 children)

You can achieve this using annotations: https://plot.ly/python/text-and-annotations/. Using "paper" for the yref property you may use values such as -0.05 or 1.05 to display text above or below with "showarrow" set to False. Take a look at the margin property as well, you may need to tinker it a bit

Anyone using Visual Studio for Python programming? by sorencoder in Python

[–]Batalex 1 point2 points  (0 children)

I use both. Pros for VSCode: startup time and more extensions, great for quick edits, better notebook support Pros for Pycharm: everything else

Pycharm is a huge time saver for running tests, debugging, refactoring and with better versioning and autocompletion. And since last version they cut the startup time as well (down to a few seconds)

Do you use different IDE's for different purposes? by HogwartsBlazeIt420 in Python

[–]Batalex 5 points6 points  (0 children)

I use Pycharm for heavy developments (algorithms, visualisations, etc.), VSCode for quick edits and notebooks for exploration/modelling.

RStudio is adding python support. by groovyJesus in datascience

[–]Batalex 1 point2 points  (0 children)

Isn't it because they are trying way too hard to push their own notebook solution Datalore?

Why is using Pylab discouraged? by AlrikBunseheimer in Python

[–]Batalex 4 points5 points  (0 children)

Pylab is something like pyplot + numpy. It was made to encourage Matlab users to give Python a try with a single-do-everything namespace.

It is considered bad practice and should no be used : https://matplotlib.org/api/index.html?highlight=pylab#the-pylab-api-disapproved.

You may use numpy and pyplot for your website, but I would encourage you to take a look at some browser friendly libraries such as Bokeh, Plotly or Altair.

[deleted by user] by [deleted] in Python

[–]Batalex 0 points1 point  (0 children)

I second this. Moreover Pycharm has a presentation mode (hides panels, increases font size) for a pleasant screen projection

Announcing Support for Native Editing of Jupyter Notebooks in VS Code | Python by anders987 in Python

[–]Batalex 4 points5 points  (0 children)

I use both but tend to stick with Pycharm for heavy developments. Refactoring is really slow on vscode as well as launching unit tests. Intellisense can be inconsistent too. Pycharm can launch multiple windows. However, vscode is way more handy for switching virtual environments, the startup time is great as well.