Posts

Composer instructions not working for local bin directory

Image
up vote 0 down vote favorite This should be enough to understand if you're familiar with Linux and Composer: [dev@localhost laravel]$ echo $PATH /usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/web/.local/bin:/home/web/bin [dev@localhost laravel]$ ls -la ~/.local/bin total 1832 drwxrwxr-x. 2 web web 22 Nov 19 18:34 . drwxrwxr-x. 4 web web 30 Nov 19 18:34 .. -rwxr-xr-x. 1 web web 1875478 Nov 19 18:31 composer [dev@localhost laravel]$ composer -bash: /usr/local/bin/composer: No such file or directory If ~/.local/bin is in $PATH and composer is in that directory, why am I getting a bash error saying it's not in /usr/local/bin/composer? I did move it from there earlier because I only wanted the dev user to be able to run it (due to https://getcomposer.org/doc/faqs/how-to-install-...

How to properly use groupby on pandas

Image
up vote 0 down vote favorite I started to work in a startup, but I'm the only data analyst, so I can't ask in my company, my problem is that in a lot of parts of my code I have to divide the dataframe, so I use the groupby to: for name, group in mvtos_material_df.groupby('Referencia'): # Work with the groups But I think that working with for loops on pandas is wrong, and for some easy functions I saw that the idea is to use groupby().apply() but I have also the next code which I don't how to fix it, if not putting it all in a method, but seems a wrong idea. moves_dict = {} for name, group in mvtos_material_df.groupby('Reference'): moves_dict[str(name)] = pd.DataFrame() # for loop to fill moves_dict with the orders per day for k, v in group.groupby(pd.Grouper(key='Date...