Questions tagged [csvreader]

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.

172 questions
0
votes
1 answer

com.opencsv not found when lauched from console

I have a Maven project that simply reads a CSV file and writes data to another file. When building/running from IntelliJ, it works fine but when I run $ java read.java from the console, it gives src/main/java/read.java:1: error: package com.opencsv…
J. Doe
  • 3
  • 1
0
votes
1 answer

Error when read text from .csv fie in c# by using CsvHelper

I have a .csv file, with header column in first row. I have issue when read values from this file, although I follow sample code in CsvHelper main page (https://joshclose.github.io/CsvHelper/getting-started/). My issue: 'There is no header record to…
0
votes
0 answers

Python write out new csv file, newline issue in text column (created on new row)

I have a major issue with my csv file, can anyone here suggestion a possible python solution to my problem? In my csv file, the 'remarks' text column creates multiple newlines and appended itself to the next row, essentially messing up the row…
Rootie
  • 111
  • 1
  • 1
  • 8
0
votes
1 answer

read csv file most booked rooms

I've got a project resit from university to get done, its basically to return a bunch of things from a CSV file in java. I've managed to do most of it from my previous attempt but one part I'm stuck on is how to read a CSV file but only a particular…
0
votes
2 answers

Why CSVReader only read few files?

I have 22 .csv files that I want to read and write into 1 .csv file This is my internal class internal class Record { [Name("RptDt")] public string Date { get; set; } [Name("Entity")] public string Entity { get; set; } …
irham dollah
  • 169
  • 13
0
votes
2 answers

Read from .csv, calculate, write on .csv

I am using csv reader for c#. This is my Record class internal class Record { int _y; int _x; [Name("y")] public int y { get; set; } [Name("x")] public int x { get; set; } public int getSum() { return…
irham dollah
  • 169
  • 13
0
votes
1 answer

Function that, given a csv file path and a keyword, returns the line number of the keyword and the line number of the next blank line

I'm attempting to create a function that, given a csv file path and keyword, can return the line number of the keyword and the line number of the next blank line after the keyword. Currently, the code works the way I want it to for the keyword, but…
mbarz
  • 13
  • 1
0
votes
1 answer

Count values from rowlist divided by key in nested dict

Here is an example dataset Firstly, I try to create a dict from values in rows: import csv who = set() figure = set() date = set() action = [] activity = {'play': 0, 'throw': 0, 'pin': 0, 'tap': 0} with open(r'ShtrudelT.csv', mode =…
0
votes
1 answer

How do I make csv.reader() index by field/string instead of by character?

I am trying to use csv.reader() to pull values from a database for later comparison. I want to have the reader index the row so that each element in the list corresponds to a comma separated value, instead of the character in the row. My code: with…
0
votes
0 answers

csv.reader error with strings including double quotes and comma inside

Since I tried all the possible variations with different codes and csv.reader dialects, my csv file has always problems with double quoted rows. I could not find the reason. If the rows has just standard commas and a string with spaces inside, it…
mech10
  • 1
  • 2
0
votes
1 answer

Can CsvReader use different Record Type Maps based upon column count?

I have a bunch of CSV files that I need to read that are similar except for the addition of a column. Essentially, the old CSV format has 7 columns, and the new will have 8. No headers. Once read, the new column will be defaulted/edited and then the…
0
votes
1 answer

Create maps from dynamic collection no longer works: Unable to cast object of type System.String to System.Object)

We are porting legacy code to dotnet standard and are facing an issue which [I believe] wasn't present in CsvHelper 2.5.0 net451. The issue appears to be that CsvReader can't manage to resolve the correct ReturnType of the underlying properties in…
Ruslan
  • 9,927
  • 15
  • 55
  • 89
0
votes
1 answer

Incorrect quotes display while reading a pipe separated csv file with python read_csv()

I am trying to read a pipe separated csv file using python read_csv() but it is incorrectly detecting the double quotes in the first field. I know it has something to do with csv reader flags but unable to figure it out. CODE with…
0
votes
0 answers

Upload Csv File Content using Axios Post Method React Js?

I am trying to upload csv file content i have a api that read csv file header by A .....AZ using form but i need to upload csv file content not csv file i am trying to do it but i failed i tried csv.parse and papa parse ,Here is my code so far i…
Funny Side
  • 36
  • 6
0
votes
1 answer

How to use Higher Order Functions with csvReader in Python

Hi I am trying to learn higher order functions (HOF's) in python. I understand their simple uses for reduce, map and filter. But here I need to create a tuple of the stations the bikes came and went from with the number of events at those stations…