Questions tagged [csvwriter]
58 questions
0
votes
0 answers
How to insert value into specific column in csv file using java
I want write multiple xml file data into one csv file, For first time writing data from first xml into csv file 8 columns created and for second xml file data writing into from 9th column of same csv file, How can we insert the data into specific…

Mahi Mokhashi
- 5
- 3
0
votes
2 answers
can I write to CSV form orderdict in python
what is the problem with my below code
the error said that is not writeable
with open('F:\learning\coding\python learning\jadi excersisse\work with files\grades_for_exercise.csv') as f:
myFile=csv.reader(f)
person_mean=OrderedDict()
…

Yaucer
- 3
- 4
0
votes
0 answers
Why do I get extra \'s when I use csv_writer?
import csv
rows = [["Line 5"], ["4 1.66 0 0 ! x1, x2, x3, x4"]]
# opening the CSV file
with open('testing.txt', 'w', newline='') as file:
# writing the CSV file
writer = csv.writer(file, quotechar='"', quoting=csv.QUOTE_NONE,…

Estiivan
- 105
- 1
0
votes
2 answers
Remove scientific notations shown when a csv file is opened using excel in .net
As per my requirement, I would like to generate an csv with csvhelper and need to open the same using Microsoft excel. But in that case values, for example "123456789455454111" is getting converted to 1.23457E+17.
I have tried using the below code,…

Aswin Moothedath
- 35
- 6
0
votes
1 answer
Read in csv files in a folder and output to one single csv
I have a folder with many csv files. I want to read them in and depending on certain criteria output the records to specific output files. So in my case I have 3 different output files.
So I have many of csv files. Let's consider one file looking…

PSt
- 97
- 11
0
votes
1 answer
How to a avoid MATLAB round values when I save them as csv file?
I used csvwrite function.
The original input vector's elements increase by 0.001: 0 , 001, 002....but when I save it as csv file the excel shows values like this at bigger numbers: 99.999, 100, 100, 100, etc. Changing the data format in excel…

jacky
- 73
- 7
0
votes
0 answers
How can I add my results into an existing CSV file one row at a time?
I am trying to classify articles by categories using the regex module. Here's the code I use to classify :
import re
def classify(txt):
prio_list = ["category 1", etc.]
matchers = {"category 1": "[Cc]ategory 1", etc.}
for category in…

juste_un_roy
- 1
- 1
0
votes
1 answer
Python export to .csv without overwriting columns in for loop
I am trying to write data from several documents (implemented in a a for loop) to a csv file in Python 3. However, the column gets overwritten every time. How can I make that data from the individual documents be printed on a csv in the rows below,…

David
- 25
- 4
0
votes
0 answers
Removing an index number from a list/csv using input
i'm doing an exercise for school where you use python to store client details in a csv and i'm having trouble with adding a way for the user to delete their client details as pop won't accept anything but an index number - can someone help me find a…
0
votes
1 answer
Extra line generated when writing serial data to file using pyserial
I am reading a string from the serial port using pySerial and then writing data to a file with a time stamp. For some reason a new line is written with an empty data entry ( with the time stamp) every time I connect the serial port. I have set the…

Aditya
- 3
- 2
0
votes
1 answer
How to convert JSON Object to a CSV file
I am getting JSON object from RedCAP API.
var result = redcap_api.ExportRecordsAsync(apiToken).Result;
How do I create a CSV file of result? I have installed NuGet packages RedCapAPI and CsvHelper.

Jay
- 1
- 2
0
votes
2 answers
Extract data from Dell Community Forum for a specific date
I want to extract the username, post title, post time and the message content from a Dell Community Forum thread of a particular date and store it into an excel file.
For example,
URL:…

NApStor
- 15
- 4
0
votes
1 answer
How to use a none delimiter with csv.writer?
I'm creating a discord bot in python and I want to have a log system for the warn command. To set up this, I'm using a .csv file in which I write all the information I want about a user.
It's the first time I use .csv, so to manipulate the data, I…

Le_char_français
- 1
- 1
0
votes
0 answers
pyspark write csv - double double quotes in output csv file
I have a dataframe format of
id|name|1|[aaa]|2|[bbb]
Need to write csv file in format
id,name
1,""[""aaa""]""
2,""[""bbb""]""
Not getting correct format. Could you please help. Thanks in advance.
My code…

Sambit
- 11
- 1
0
votes
1 answer
How to Read and Write to the Same csv File?
I am trying to read and write to the same csv file, to specifically delete a row in a csv file if a certain header contains a value. My csv file looks like this:
Item #
Price
Quantity
Name
1
2.99
1
Muffin 1
2
3.99
2
Muffin…

py_coder1019
- 95
- 1
- 8