write a command line script that takes several csv files as arguments. each csv file (found in the `fixtures` directory of this repo) will have the same columns. your script should output a new csv file to `stdout` that contains the rows from each of the inputs along with an additional column that has the filename from which the row came (only the file's basename, not the entire path). use `filename` as the header for the additional column.

Respuesta :

Using the knowledge in computational language in python it is possible to write a code that your script should output a new csv file to `stdout` that contains the rows from each of the inputs.

Writting the code:

import glob

import shutil

with open('combined_csv.csv', 'wb') as output_fp:

   for file_name in glob.glob('*.csv'):

       with open(file_name, 'rb') as fp:

           shutil.copyfileobj(fp, output_fp)

See more about python at brainly.com/question/18502436

#SPJ1

Ver imagen lhmarianateixeira