Category "csv"

Convert csv to parquet file using python

I am trying to convert a .csv file to a .parquet file. The csv file (Temp.csv) has the following format 1,Jon,Doe,Denver I am using the following python

How can i fill in missing csv file value base on reference csv file

I have a reference file like this Id, Value1, Value2 a, a1, a2 b, b1, b2 c, c1, c2 d, d1, d2 ... n, n1, n2 and the missing file Id, Value1, Value2 d, ,

Parsing in memory CSV files from zip archives

I'm working on a new library which will allow the user to parse any file (xlsx, csv, json, tar, zip, txt) into generators. Now I'm stuck at zip archive and when

How to solve error UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 106: invalid continuation byte in tensorflow

I need help to deal with an error... I try to create an object detection program with a tutorial made by lazy tech on Youtube. This tutorial use this repo on gi

Parse CSV records in to an array of objects in JavaScript

I'm new to JS and not much exp in Regex to play with string manipulation. Here is my CSV file with records in tabular form with the first line as headers and

Convert JSON to CSV and maintain column order

I need to convert json to csv for an inventory feed with no headers and I have no problem with the conversion but the column order is getting changed. Is there

R- import CSV file, all data fall into one (the first) column

I'm new, and I have a problem: I got a dataset (csv file) with the 15 columns and 33,000 rows. When I view the data in Excel it looks good, but when I try t

How to rename key/header in csv DictReader

For instance given mycsv.csv file h1,h2 a,b c,d how to rename h2 onto HTwo with reader reader = csv.DictReader(open('mycsv.csv')) (Additionally how to wr

How to select several rows when reading a csv file using pandas?

I have a very large csv file with millions of rows and a list of the row numbers that I need.like rownumberList = [1,2,5,6,8,9,20,22] I know there is somethi

Pandas: ValueError: cannot convert float NaN to integer

I get ValueError: cannot convert float NaN to integer for following: df = pandas.read_csv('zoom11.csv') df[['x']] = df[['x']].astype(int) The "x" is a column i

Pandas read csv not reading a file properly. Not splitting into proper columns

So I'm trying to read in this dataset from Kaggle. https://www.kaggle.com/gmadevs/atp-matches-dataset#atp_matches_2016.csv I'm using pandas' read_csv functio

Pandas read csv not reading a file properly. Not splitting into proper columns

So I'm trying to read in this dataset from Kaggle. https://www.kaggle.com/gmadevs/atp-matches-dataset#atp_matches_2016.csv I'm using pandas' read_csv functio

Adding timestamp index column with a column header to existing csv (python)

#gets rid of spaces in existing csv headers def getColumns(readCSV): return [column.replace(' ','') for column in next(readCSV)] #insert format used to

Looping using dataweave

my input xml: <Root> <Element> <Record att="a">value</Record> <Record att="b">value</Record>

Query (SQL like joins) remote CSV for data analysis

I would like to query (SQL with joins) CSV files sitting in a network folder for performing data analysis work. I'm not allowed to move the files out of the net

Sklearn can't convert string to float

I'm using Sklearn as a machine learning tool, but every time I run my code, it gives this error: Traceback (most recent call last): File "C:\Users\FakeUserMad

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x96 in position 35: invalid start byte

I am new to Python, I am trying to read csv file using below script. Past=pd.read_csv("C:/Users/Admin/Desktop/Python/Past.csv",encoding='utf-8') But, getting

R: unzipping large compressed .csv yields "zip file is corrupt" warning

I am downloading a 78MB zip file from the UN FAO, which contains a 2.66GB csv. I am able to unzip the the downloaded file from a folder using winzip, but have b

Add Glossary to Google translte V3 API by python

I am trying to add a glossary by CSV. I put the CSV on my google storage. I got this Error: google.api_core.exceptions.InvalidArgument: 400 Failed to parse cont

Copy Data from CSV file to Sqlite file in Android

I want to copy the data from CSV file to SQLite file for my android application.SQLite table structure i.e. the columns are different than the CSV file columns.