Skip to content
Advertisement

Tag: csv

Python iterate folder of csv and convert do json

I am amateur at python but I have a task of converting folder of csv to json files. I have this script working with specified CSV file but I have no idea how to make the script iterate thrue folder of csv and convert all of those csv to json. The original script: someone will give me a hint? Answer

How to store CSV file in database?

There is a output file from Python Pandas with a lot of columns with headers. I need to be able handle this file by script and get CSV files in different columns positions. For example, initial file has columns As variation I need to get it in different sequence: I wonder what is the best way to store this file

pd.read_csv() keep number of decimals

I want to read a csv but it culls the number of decimals: gives (first 2 rows, first five columns): enter image description here the original data (here) has 8 decimal places in the 3rd and 4th columns. I need those. 2211 196568.000 -25.732036008 28.282629130 1387.8994 2211 196569.000 -25.732032386 28.282633712 1389.4025 How do I read a csv and retain the

How to put date(parsed from csv) in Python to mysql?

I’ve made separate simple example just to check what method would work with date in my case and didn’t find any solution. we have: db table: code CSV file example_v2.csv: Trace Could you please assist in even find the documentation fit my case or indicate the direction. I’ve already tried a lot of methods such as: etc. Answer thanks to

Advertisement