1

I am working on Spyder (Anaconda). I always have several error messages since I work on Windows. I have already tried this code in Linux and It worked ! from dfply import * worked very well.


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

Do you know what's wrong ? Do I have to install something ? or uninstall ? Thank you

CiaPy
  • 25
  • 6

2 Answers2

1

use the following command in Anaconda prompt(anaconda3):
pip install dfply
This worked for me.

thashwin
  • 11
  • 2
0

Just to check that you installed the dfply package with Conda? https://anaconda.org/tallic/dfply

apr_1985
  • 1,764
  • 2
  • 14
  • 27
  • When I do that I have another error message : Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. PackagesNotFoundError: The following packages are not available from current channels: - dfply – CiaPy Apr 01 '21 at 15:29