Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

How do I sort a mix.csv.gz file into 10 new files based off s column called inte

ID: 3889044 • Letter: H

Question

How do I sort a mix.csv.gz file into 10 new files based off s column called integerA.
The integer A column is filled with a mix of random numbers 1-10. When I sort the csv file into 10 new files all the 1's have to be together and the 2's as well as the 3's and so on.... the other columns in the csv file are id which goes 1...n , mix is just a combo of letters and numbers and string is just characters.

What I don't know how to do is sort the csv based off of integerA into new 10 new zip files the numbers are unsorted.

Explanation / Answer

d = data('myfile.csv') d = data('myfile-2014-01-*.csv.gz') d = data('myfile.csv') >>> d Exception: Integer column has NA values >>> d.dshape # Perhaps that integer column should be a float dshape("var * {name: string, amount: int64}") # >>> ds = dshape("var * {name: string, amount: float64}") # change int to float >>> d = data('myfile.csv', dshape=ds)
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote