kieferk / dfply

dplyr-style piping operations for pandas dataframes
GNU General Public License v3.0
889 stars 103 forks source link

group_by ModuleNotFoundError: No module named 'dfply.group'; 'dfply' is not a package #104

Open CiaPy opened 3 years ago

CiaPy commented 3 years ago

Hi ,

I always have several error message, I don't know why .


from dfply import *
from dfply.group import group_by #equivalent R dplyr

stat_logiso = select_chpsfinal >> group_by(X.Code_BSS, X.ancienBSS) >> summarise(nb_passes = X.ancienBSS.count(),
                                                                nblitho_na = X.lithologie.isna().sum(),
                                                                nbstrati_na = X.stratigraphie.isna().sum(),
                                                                pourclitho_na = (X.lithologie.isna().sum())/(X.ancienBSS.count())*100,
                                                                pourcstrati_na = (X.stratigraphie.isna().sum())/(X.ancienBSS.count())*100,
                                                                non_fiable = ((X.Niveau_validation == 0).sum())/(X.ancienBSS.count())*100,
                                                                fiable = ((X.Niveau_validation == 1).sum())/(X.ancienBSS.count())*100,
                                                                Tres_fiable = ((X.Niveau_validation == 2).sum())/(X.ancienBSS.count())*100)

In spyder I have a first error message

DistutilsArgError: no commands supplied 
SystemExit: usage: Moulinette_logcomplet.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: Moulinette_logcomplet.py --help [cmd1 cmd2 ...]
   or: Moulinette_logcomplet.py --help-commands
   or: Moulinette_logcomplet.py cmd --help

error: no commands supplied

And on the terminal, when I do that : Moulinette_logcomplet.py --help-commands , I have another error message


from dfply.group import group_by #equivalent R dplyr
ModuleNotFoundError: No module named 'dfply.group'; 'dfply' is not a package

Can you tell me what's wrong please ? Thank you