HackerTrans
TopNewTrendsCommentsPastAskShowJobs

swied

no profile record

comments

swied
·vor 3 Jahren·discuss
Nice article. I totally agree about SymPy making math fun. I used Mathematica a lot in college, but stopped once it wasn’t free to me anymore.

Here’s a blog post I made recently showing some fun SymPy calculations. https://www.swied.com/posts/make-a-ringtone-sound/make-a-rin...
swied
·vor 4 Jahren·discuss
What about when the steps don't return a data frame object, like 'groupby'? Then, you will have to think about coming up a name other than 'df'. Save your mental energy for making comments. Here's an example...

    # Per store revenue for high price items   
    df_agg = (
      df1
      .query("unit_price > 400")
      .groupby('store_id','store_name')
      .agg({'revenue':     np.sum, 
            'customer_id': 'nunique'})
    )