Read csv file and create a new file
Neil Cerutti
neilc at norwich.edu
Thu Feb 28 14:32:47 EST 2013
On 2013-02-28, io <maroso at libero.it> wrote:
> Hi,
>
> i have to files.
>
> First file is a csv file
> Second file is a plain text file where each row has a value (text)
>
> I want to be able to create a third file using data from the first file
> excluding the values listed in the second file.
>
> Example:
>
> First file:
> -----------
>
> mtgoxeur 12 24 36
> mtgoxusd 10 12 14
> mtgoxpln 2 4 6
>
>
> Second file:
> ------------
>
> mtgoxusd
>
>
>
> Third File (the resulting one) :
> --------------------------------
>
> mtgoxeur 12 24 36
> mtgoxpln 2 4 6
>
> Thanks to anyone that can help
You don't appear to need the csv module at all. You'll just need
the startswith string function.
For more help, please show us some code.
--
Neil Cerutti
More information about the Python-list
mailing list