cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-337958%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EWie%20generiere%20ich%20einen%20zusammenfassenden%20Durchschnitt%20mehrerer%20CSV-Dateien%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-337958%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EIch%20habe%20mehrere%20CSV-Dateien%20im%20angeh%C3%A4ngten%20Format%20in%20einem%20bestimmten%20Ordner.%20Wie%20erstelle%20ich%20eine%20neue%20Datei%2C%20die%20die%20Zusammenfassung%20des%20Durchschnitts%20aller%20Spalten%20A%2C%20B%2C%20C%2C%20D%20jeder%20CSV-Datei%20im%20folgenden%20Format%20enth%C3%A4lt%3A%3C%2FP%3E%3CTABLE%20border%3D%220%22%20cellspacing%3D%220%22%20cellpadding%3D%220%22%3E%3CTBODY%3E%3CTR%3E%3CTD%3EDateiname%3C%2FTD%3E%3CTD%3EEIN%3C%2FTD%3E%3CTD%3EB.%3C%2FTD%3E%3CTD%3EC.%3C%2FTD%3E%3CTD%3ED.%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3Eavg_colA_file1%3C%2FTD%3E%3CTD%3Eavg_colB_file1%3C%2FTD%3E%3CTD%3Eavg_colC_file1%3C%2FTD%3E%3CTD%3Eavg_colC_file1%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3Eavg_colA_file2%3C%2FTD%3E%3CTD%3Eavg_colB_file2%3C%2FTD%3E%3CTD%3Eavg_colC_file2%3C%2FTD%3E%3CTD%3Eavg_colC_file2%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3EIch%20wei%C3%9F%2C%20wie%20man%20den%20Durchschnitt%20jeder%20CSV-Datei%20mithilfe%20einer%20Tabellenzusammenfassung%20generiert%2C%20aber%20wie%20k%C3%B6nnen%20wir%20dasselbe%20f%C3%BCr%20mehrere%20CSV-Dateien%20mit%20einem%20einzigen%20Skript%20tun%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-337958%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3EAnalytik%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDatentabelle%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDAMHIRSCHKUH%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESkripting%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-337977%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Wie%20erstelle%20ich%20einen%20zusammenfassenden%20Durchschnitt%20mehrerer%20CSV-Dateien%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-337977%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EVerwenden%20Sie%20%22Import%20mehrerer%20Dateien%20()%22.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDie%20Dokumentation%20finden%20Sie%20im%20Scripting-Handbuch%2C%20das%20in%20der%20JMP-Dokumentationsbibliothek%20im%20Pulldown-Men%C3%BC%20Hilfe%20verf%C3%BCgbar%20ist.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-337978%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Wie%20generiere%20ich%20einen%20zusammenfassenden%20Durchschnitt%20mehrerer%20CSV-Dateien%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-337978%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EVielen%20Dank%2C%20aber%20dies%20importiert%20nur%20mehrere%20Dateien%20in%20eine%20einzige%20Datentabelle.%20Ich%20wollte%20wissen%2C%20wie%20ich%20den%20Durchschnitt%20aller%20Spalten%20in%20jeder%20Datei%20mit%20einem%20einzigen%20Skript%20berechnen%20kann%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-337979%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Wie%20erstelle%20ich%20einen%20zusammenfassenden%20Durchschnitt%20mehrerer%20CSV-Dateien%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-337979%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EBeim%20Import%20mehrerer%20Dateien%20kann%20eine%20neue%20Spalte%20hinzugef%C3%BCgt%20werden%2C%20die%20den%20Dateinamen%20der%20Datei%20enth%C3%A4lt%2C%20aus%20der%20die%20Daten%20stammen%20(Spalte%20Dateiname%20hinzuf%C3%BCgen).%20Dies%20bedeutet%2C%20dass%20Sie%20Ihrer%20Zusammenfassung%20problemlos%20eine%20By%20()%20-%20Klausel%20hinzuf%C3%BCgen%20k%C3%B6nnen%2C%20die%20f%C3%BCr%20jede%20importierte%20Datei%20separate%20Durchschnittswerte%20bereitstellt.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-337982%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Wie%20generiere%20ich%20einen%20zusammenfassenden%20Durchschnitt%20mehrerer%20CSV-Dateien%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-337982%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHaben%20Sie%20versucht%2C%20ob%20die%20Funktion%20Tabellen%20-%26gt%3B%20Zusammenfassung%20den%20gew%C3%BCnschten%20Job%20macht%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mlo1_0-1606584605026.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22mlo1_0-1606584605026.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F28656i7664CE37324EFA79%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22mlo1_0-1606584605026.png%22%20alt%3D%22mlo1_0-1606584605026.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mlo1_1-1606584677703.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22mlo1_1-1606584677703.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F28657iA2339F07E02A2D23%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22mlo1_1-1606584677703.png%22%20alt%3D%22mlo1_1-1606584677703.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-338077%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Wie%20generiere%20ich%20einen%20zusammenfassenden%20Durchschnitt%20mehrerer%20CSV-Dateien%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-338077%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EIch%20versuche%20das%20folgende%20Skript%2C%20aber%20es%20l%C3%A4uft%20nicht.%20K%C3%B6nnten%20Sie%20bitte%20mitteilen%2C%20wo%20das%20Problem%20liegt%3F%3CBR%20%2F%3E%20dt%20%3D%20Import%20mehrerer%20Dateien%20(%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20Ordner%20festlegen%20(%3CBR%20%2F%3E%20%22C%3A%20%5C%20Benutzer%20%5C%20meine_Dateien%20%5C%22%3CBR%20%2F%3E%20)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20Set%20Name%20Filter%20(%22*.%20*%3B%22)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20Set%20Name%20Enable%20(0)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20Gr%C3%B6%C3%9Fenfilter%20einstellen%20(%7B37111019%2C%2038896395%7D)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20Set%20Size%20Enable%20(0)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20Datumsfilter%20festlegen%20(%7B3689368844.046%2C%203689369157.819%7D)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20Set%20Date%20Enable%20(0)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20Set%20Add%20File%20Name%20Column%20(1)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20Set%20Add%20File%20Size%20Column%20(0)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20Set%20Dateidatenspalte%20hinzuf%C3%BCgen%20(0)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20Importmodus%20einstellen%20(%22CSVData%22)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20Zeichensatz%20einstellen%20(%22Best%20Guess%22)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20Stack-Modus%20einstellen%20(%22Stack%20Similar%22)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20Set%20CSV%20Has%20Header%20(1)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20CSV%20Allow%20Numeric%20(1)%20einstellen%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20Setze%20CSV%20First%20Header%20Line%20(1)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20CSV-Anzahl%20der%20Kopfzeilen%20einstellen%20(1)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20CSV%20First%20Data%20Line%20(2)%20einstellen%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20CSV%20EOF%20Comma%20(1)%20setzen%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20CSV%20EOF%20Tab%20(0)%20setzen%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20CSV%20EOF%20Space%20(0)%20einstellen%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20CSV%20EOF%20Spaces%20(0)%20einstellen%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20CSV%20EOF%20Other%20einstellen%20(%22%22)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20CSV%20EOL%20CRLF%20(1)%20einstellen%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20CSV%20EOL%20CR%20(1)%20einstellen%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20CSV%20EOL%20LF%20(1)%20einstellen%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20CSV%20EOL%20Semikolon%20setzen%20(0)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20CSV%20EOL%20Other%20einstellen%20(%22%22)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20CSV-Angebot%20festlegen%20(%22%5C!%22%20%22)%2C%3CBR%20%2F%3E%20%26lt%3B%26lt%3B%20CSV%20Escape%20einstellen%20(%22%22)%3CBR%20%2F%3E%20)%20%26lt%3B%26lt%3B%20Daten%20importieren%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%20dt%20%26lt%3B%26lt%3B%20Zeilen%20abrufen%2C%20wo%20(%3A%20A%20%26lt%3B%3D%2020)%3B%3CBR%20%2F%3E%20dt%20%26lt%3B%26lt%3B%20Zeilen%20l%C3%B6schen%20(sel)%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%20dt%20%26lt%3B%26lt%3B%3CBR%20%2F%3E%20Zusammenfassung(%3CBR%20%2F%3E%20Gruppe%20(%3A%20Dateiname)%2C%3CBR%20%2F%3E%20Mittelwert%20(%3A%20A)%2C%3CBR%20%2F%3E%20Frequenz%20(%22Keine%22)%2C%3CBR%20%2F%3E%20Gewicht%20(%22Keine%22)%3CBR%20%2F%3E%20)%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-338078%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Wie%20erstelle%20ich%20einen%20zusammenfassenden%20Durchschnitt%20mehrerer%20CSV-Dateien%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-338078%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EMFI%3CEM%3E%20immer%3C%2FEM%3E%20Gibt%20eine%20Liste%20von%20Datentabellen%20zur%C3%BCck%20(nicht%20eine%20Tabelle%2C%20sondern%20eine%20%7BListe%7D%20mit%20einer%20oder%20mehreren%20Tabellen).%20Wir%20m%C3%BCssten%20einige%20Nachrichten%20aus%20dem%20Protokoll%20sehen%2C%20um%20eine%20bessere%20Antwort%20zu%20erhalten%20-%20nicht%20sicher%20%C3%BCber%20die%20Syntax%20zum%20L%C3%B6schen%20von%20Zeilen%20-%2C%20aber%20eine%20der%20folgenden%3A%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Efor(i%3D1%2Ci%26lt%3B%3Dnitems(dt)%2Ci%2B%3D1%2C%0Adtx%20%3D%20dt%5Bi%5D%3B%0A%0Adtx%20%26lt%3B%26lt%3B%20Get%20Rows%20Where%20(%20dtx%3AA%20%26lt%3B%3D%2020)%3B%0Adtx%20%26lt%3B%26lt%3B%20delete%20rows(sel)%3B%0A%0Adtx%26lt%3B%26lt%3B%0ASummary(%0AGroup(%20dtx%3AFile%20Name%20)%2C%0AMean(%20dtx%3AA%20)%2C%0AFreq(%20%22None%22%20)%2C%0AWeight(%20%22None%22%20)%0A)%0A%0A)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Eoder%20wenn%20Sie%20wissen%2C%20dass%20es%20nur%20einen%20gibt%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edtx%20%3D%20dt%5B1%5D%3B%0Adtx%20%26lt%3B%26lt%3B%20Get%20Rows%20Where%20(%20dtx%3AA%20%26lt%3B%3D%2020)%3B%0Adtx%20%26lt%3B%26lt%3B%20delete%20rows(sel)%3B%0A%0Adtx%26lt%3B%26lt%3B%0ASummary(%0AGroup(%20dtx%3AFile%20Name%20)%2C%0AMean(%20dtx%3AA%20)%2C%0AFreq(%20%22None%22%20)%2C%0AWeight(%20%22None%22%20)%0A)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EVerwenden%20von%20dtx%20als%20aktuelle%20Tabelle%20aus%20der%20Liste%20in%20dt.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-338081%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Wie%20erstelle%20ich%20einen%20zusammenfassenden%20Durchschnitt%20mehrerer%20CSV-Dateien%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-338081%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F982%22%20target%3D%22_blank%22%3E%40Craige_Hales%3C%2FA%3E%20hat%20die%20richtige%20Antwort%2C%20mit%20einem%20Fehler%20aus%20dem%20urspr%C3%BCnglichen%20Code.Die%20Variable%20%22sel%22%20in%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edtx%20%26lt%3B%26lt%3B%20delete%20rows(sel)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Eist%20nicht%20definiert.Der%20Code%20muss%20ge%C3%A4ndert%20werden%2C%20damit%20die%20folgenden%20zwei%20korrekt%20funktionieren%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edtx%20%3D%20dt%5B1%5D%3B%0Asel%20%3D%20dtx%20%26lt%3B%26lt%3B%20Get%20Rows%20Where%20(%20dtx%3AA%20%26lt%3B%3D%2020)%3B%0Adtx%20%26lt%3B%26lt%3B%20delete%20rows(sel)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
jojmp
Level III

How to generate a summary average of multiple csv files?

I have multiple csv files in the attached format in a particular folder , how do I generate a new file which contains the summary of the average of all the columns A, B, C, D of each csv file in the below format:

filenameABCD
 avg_colA_file1avg_colB_file1avg_colC_file1avg_colC_file1
 avg_colA_file2avg_colB_file2avg_colC_file2avg_colC_file2
     

I know to generate the average of each csv file using table summary but how can we do the same for multiple csv files using a single script?

13 REPLIES 13
jojmp
Level III

Re: How to generate a summary average of multiple csv files?

Sure but I could not find my answer there because close( dtx, nosave ); closes both the data table and summary table. I wanted to close only the data table & keep the summary table open, is that possible?
txnelson
Super User

Re: How to generate a summary average of multiple csv files?

The reason for it closing the summary table is that you specified to Link the summary table to the original table. Change or add
Link to Original Data Table(0)
Jim
jojmp
Level III

Re: How to generate a summary average of multiple csv files?

Thanks a lot really appreciate your inputs!
mlo1
Level IV

Re: How to generate a summary average of multiple csv files?

Did you try if Tables -> Summary function is doing the job you want?

mlo1_0-1606584605026.pngmlo1_1-1606584677703.png