Live data from Hacker News

Pandas vs. Julia – cheat sheet and comparison

datascientyst.com

41–50 of 138 posts

Re: Pandas vs. Julia – cheat sheet and comparison

#41

Unreadable on mobile

You do a lot of software development on mobile?

We should nurture more accessibility, in this case, mobile compatibility.

For instance, consider someone who has limited access to desktop computers and have to go by with a mobile device. These individuals do exist, and their access is as legitimate as any other.

Re: Pandas vs. Julia – cheat sheet and comparison

#42
post #31
post #2

Nah, I'll do it with SQL

Same here. But have you tried duckdb? You can do sql in the pandas dfs and it is fast af. https://duckdb.org/2021/05/14/sql-on-pandas.html

  mydf = pd.DataFrame({'a' : [1, 2, 3]})
  print(duckdb.query("SELECT SUM(a) FROM mydf").to_df())
I can see the appeal, but if you're working in Python, something doesn't sit right with me when having to write out variable names as strings. E.g., if I want to refactor the code, my LSP or parser won't pick up those references.

> The SQL table name mydf is interpreted as the local Python variable mydf [...] Not only is this process painless, it is highly efficient.

It might be painless and convenient at first, but I feel like this could get you in trouble down the line. Is there a way to avoid this?

Re: Pandas vs. Julia – cheat sheet and comparison

#43

Earlier quoted context omitted.

How’s that related to the article not being mobile friendly?

It's a reference sheet for a programming language. Like it's clearly designed to be read as you're writing code. I don't understand in which circumstance you'd optimize such a document for mobile use.

I sometimes read the docs for something while on the train, and in those cases, it’s through the mobile phone.

It happens what when I cannot stop thinking of a problem and really want to find a solution.

Re: Pandas vs. Julia – cheat sheet and comparison

#44
post #19

Yeah this is basically why I keep trying and bouncing off Julia. I understand the real performance reasons why you'd choose to use Julia but the syntax is the perfect distance from python to make it extremely difficult to me. It's just close enough to get constantly confused. So if I really wanted to do much work in it I'd have swear off python - and I can't do that because for trivial stuff python is more convenient…

I have not done anything even remotely significant in Julia, but the little I played with didn't seem to indicate to me that it would be bad for trivial stuff...what trivial stuff is hard in Julia but easy in Python?

[deleted]

Re: Pandas vs. Julia – cheat sheet and comparison

#46

The cheatsheet goes wrong already for the first example of declaring a df: - you could do a range in python (range(11, 14)) - columns are called col_1 & col_2 vs a & b (both sets are horrible names) - pandas defines index of 0, 1, 3, while Julia would most likely have 0, 1, 2?

Also df.loc[1:3, :] doesn't get the first N rows. First because of 0-indexing, second because when your index isn't ordered integers, you'll get completely unexpected results with .loc.

Re: Pandas vs. Julia – cheat sheet and comparison

#47
post #18
post #10

This seems very poor - the comparison is between pandas and DataFrames.jl, not Julia; syntax comparison is very surface-level; cheatsheats are low resolution; the learning curve section says nothing about the learning curve; and the conclusion is "do whatever you like".

But there's CSV.jl so I didn't change title. I don't see any low resolution, maybe a font choice issue? I'd say the conclusion is the right thing to say for such a short comparison.

You have many errors in the tables, for example the pandas indexing is obviously wrong.

Re: Pandas vs. Julia – cheat sheet and comparison

#48

Earlier quoted context omitted.

You do a lot of software development on mobile?

We should nurture more accessibility, in this case, mobile compatibility. For instance, consider someone who has limited access to desktop computers and have to go by with a mobile device. These individuals do exist, and their access is as legitimate as any other.

[deleted]

Re: Pandas vs. Julia – cheat sheet and comparison

#49
post #47
post #18

Earlier quoted context omitted.

But there's CSV.jl so I didn't change title. I don't see any low resolution, maybe a font choice issue? I'd say the conclusion is the right thing to say for such a short comparison.

You have many errors in the tables, for example the pandas indexing is obviously wrong.

It' s not my website.
Post reply on HN