DDI

Group Admins

Other Groups

Create multiple seperate CSV’s from a CSV

Viewing 1 reply thread
  • Author
    Posts
    • #75
      rev.research
      Participant

      So we get a ton of requests to either add or remove DNS entries and I’m trying to figure out a way to make this quicker by exporting all the requests into one CSV and then run a python script to export the one CSV into multiple CSVs with the first column appended to the end of a filename

      csv_2_seperateCSVs

      Attached is the example_source CSV

      Anyone have any idea’s on how I can accomplish this?

      0
      0
    • #78
      admin
      Keymaster

      Attached is a solution you could try but I was getting an error that looks like this:

      $ python csv2csv.py csv_2_seperateCSVs.csv
      Traceback (most recent call last):
        File "csv2csv.py", line 1, in 
          import pandas as pd
      ImportError: No module named pandas

      You’ll get the error above unless you have the required python modules.

      I wasn’t able to install using pip because we have a proxy and it blocks all traffic towards any of the pypi.org sites so I had to install the python modules locally.

      I used a command like this to install one of the modules

      python module install: sudo pip3 install pytz --no-index --find-links file:///home/guru/.config/pip/pytz-2020.1.tar.gz -vvv

      Now the requirement to also output one master csv in addition to the individual csv’s

      0
      0
Viewing 1 reply thread
  • You must be logged in to reply to this topic.