joshfraser / robinhood-to-csv

Python script to export Robinhood trades to a CSV file
MIT License
259 stars 109 forks source link

How to correctly open the csv file: Data Skewed #58

Open neshant opened 4 years ago

neshant commented 4 years ago

Not an issue with code but How do I correctly open/import the csv file in excel the data is skewed due to json in the data which is also a csv data.

neshant commented 4 years ago

there are three columns in particular that are trouble , I just made a small change to get around opening the file in csv although all columns could do this in case more of the json columns are added.

        try:
            if key == 'executed_notional' or key == 'last_trail_price' or key == 'dollar_based_amount' or key == 'total_notional':
                csv += "\""+str(fields[row][key])+"\""
            else:
                csv += str(fields[row][key])
        except:
            csv += ""
savingsandloan commented 3 years ago

dupe of #53

pvh1983 commented 3 years ago

Thanks a lot. It worked. I took me a while to find out where to insert it so I post it here: image