A CsvReader represents a reader that provides forward-only access to a CSV text data source. A CsvReader may also support other delimited-separator formats.
Questions tagged [csvreader]
172 questions
0
votes
0 answers
How to know that I have the last line of the file in CSVReader
I use from CSVReader in java to import those large files in DataBase.
What method should I use if I want to know that I have the last line of the file and then the file ends?
my code is:
String pathFile = "D:\\";
String ifrsFileName =…

mehnet ali
- 73
- 3
- 12
0
votes
0 answers
weird letters and signs when reading csv file
I am trying to open csv table and use it with sqlite. I've tried several methods but they all result with a table which inserts \n instead of a blank space ' ' or  letters.
I tried to change the encoding but everything i do seems to end up with the…

Nat
- 81
- 1
- 6
0
votes
1 answer
How to rewrite only one field (line[n]) in csv but in same time be able to work with data?
I have a csv file with three lines and three columns here.
This is the csv file
At first I want to print all the lines.
Subsequently, for each of them, program check whether it is written in the second field(index 1) USA. If so, program will take…

Mirek6
- 25
- 8
0
votes
1 answer
Read csv file in c# issue
I've a data file(csv) which I need to read in c#, but different libraries
CsvHelper
LumenWorksCsvReader
are fail to accomplish this.
Ex. with LumenWorksCsvReader
using (CsvReader csv = new CsvReader(new StreamReader(path), true))
{
…

Manish Jain
- 217
- 1
- 4
- 16
0
votes
2 answers
Reading CSV files and pulling specific data
Here is some sample data
Game
Date
HomeTeam
FT
HT
AwayTeam
1
(Fri) 10 Aug 2018 (W32)
Manchester United FC
2-1
1-0
Leicester City FC
2
(Sat) 11 Aug 2018 (W32)
AFC Bournemouth
2-0
1-0
Cardiff City FC
3
(Sat) 11 Aug 2018 (W32)
Fulham…

joeyfroots
- 1
- 4
0
votes
0 answers
CSVHelper files with different encodings
The files you want to read can be in 2 different encodings, UTF-8 and Windows-1251. UTF-8 is normally recognized, but 1251 it cannot recognize correctly. What encoding of the file before it was processed is not known. What are the possible…

JonnyJon44
- 73
- 1
- 11
0
votes
0 answers
comparing two files in python using csvreader
I am reading two csv files and comparing the 2 col in these files.
enroll_file_read = open(enroll_feed_modified, "r", encoding="utf-8")
drop_file_read = open(drop_feed_modified, "r", encoding="utf-8")
enroll_csvreader =…

Prasanna K
- 23
- 4
0
votes
1 answer
Combine date and time from two separate columns in a csvreader generator object
I have a CSV file like this:
2021-08-09 15:50:44 38962 part-00000-6baa0883-5212-49f7-9ba2-63a352211fdd-c000.snappy.parquet
2021-08-09 16:50:44 38962 part-00000-6baa0883-5212-49f7-9ba2-63a352211fdd-c000.snappy.parquet
I'd like to extract…

PianoTiger
- 41
- 7
0
votes
0 answers
Python problem reading CSV files that contain the word NUL
I have a short Python script for reading CSV files. So far nothing special.
def csvReader(filename):
return csv.reader(open(filename,'tr', encoding='utf-8'))
for row in csvReader('test.csv'):
print(row)
However, it triggers an error…

Mephisto
- 11
- 1
0
votes
1 answer
How to map a CSV to Object with List using CsvMapper?
I'm trying to map a Csv file to an Object what instances List of Objects using CsvMapper, is that even possible?
Example:
Content of Csv file (without header):
Field 1: name
Field 2: gender
Field 3: hobby (List comma separated)
Field 4:…

kaptan
- 23
- 1
- 7
0
votes
1 answer
Java: How can I update the existing csv file and not create a new one?
I am writing to a csv file and then later updating it. But with. my update code, a new same file is generated. Below is my code and I was wondering how I can update without creating a new file.
public void updateFile(List fileNames, String…

Atihska
- 4,803
- 10
- 56
- 98
0
votes
0 answers
Insert 185 columns with 7L rows in to Oracle sql table using Python Cx_Oracle
I want to insert 185 columns consisting of 7L rows from a CSV file in to a Oracle Sql table using Python. I have used Cx_oracle to connect to Oracle DB. I know how to insert data in to table using python for small sets of data (having around 10 to…

swetha reddy
- 201
- 5
- 19
0
votes
1 answer
How would I go about accessing a specific element in a CSV based off of user input in python?
Lets say I have a csv as such:
make,model,UCity,UHighway,year
Alfa Romeo,Spider Veloce 2000,23.3333,35,1985
Ferrari,Testarossa,11,19,1985
Dodge,Charger,29,47,1985
Dodge,B150/B250 Wagon 2WD,12.2222,16.6667,1985
I want to access the 'Ucity' and…

o_gulsan
- 9
- 2
0
votes
2 answers
Getting SyntaxError for my csv reader code, even though I put in the correct column name
My code:
import csv
def searchProxy():
csv_file = csv.reader(open ('C:/Users/Keanu/Documents/CSV/07-12-report.csv', 'r'))
cardIdentifier = input('Enter proxy')
for row CardIdentifier in csv_file:
if Card Identifier ==…

user16417310
- 11
- 1
0
votes
1 answer
TypeError: unhashable type: 'list' Python error while append
I am having a CSV file which contains a ordering of test cases and i have a xml file which is unordered and i am trying to order the xml file according to the csv file. While doing that i am getting this error:-
TypeError …
user16399928