Questions tagged [csv]
Comma-Separated Values or Character-Separated Values (CSV) is a standard "flat file database" format for storing tabular data in plain text, consisting of an optional header row that lists the table fields delimited by commas or tabs or other delimiter character, followed by one or more rows (newline separated) representing the table records as delimited lists of the values. Newlines and separator characters can appear within (quoted) fields.
75,121
questions
0
votes
2answers
13 views
Parsing parent and child element into a csv using jq
I have a big file that has lines as below.
{
"total": 320,
"assets": [
{
"audit": {
"created": {
"date": "2019-09-30T12:...
0
votes
0answers
21 views
How would i make a simple script with python to use a csv file list to check another csv file for specific information?
So i have 2 csv files, one with a list of names only, and the other with names in the first column followed by several columns of information, and for example one of those column would be if that ...
0
votes
0answers
5 views
Jmeter logging for API URL+Request+ResponseCode+ResponseBody in csv
I like to save the following parameters in a CSV file in single line for HTTP REST call in Jmeter.
Endpoint URL, request body, request header, response code, response body . could someone help with JS ...
0
votes
0answers
12 views
How to create csv files from dataframe sections at equal row intervals?
I am new to R, so I hope I can formulate my question well. I have a dataframe with 1,143,623 rows and 12 columns. The head of this dataframe is:
LAT LON YEAR DOY PRECTOT RH2M T2M_RANGE T2M_MAX ...
0
votes
0answers
7 views
Writing 2D array into .CSV file
Sorry,I know this topic has been discussed several times already, but I have checked similar questions and none of them addresses my problem.
I'm trying to get several coordinates in format (x,y,z) to ...
0
votes
3answers
31 views
how to parse csv with name value pairs as text cells with colon seperation
believe it or not, i couldn't find anywhere an answer to this:
i have csv files with the following format:
Epoch: 1 Loss: 164.0284653747
Epoch: 2 Loss: 164.0155072829
Epoch: 3 Loss: 163.9634398650
...
-3
votes
1answer
33 views
CSVHelper - CSV Parsing error with double quotes in header
I am having a parsing error when i am trying to read a CSV file using CSVHelper.
In the header i have Quotes, so i don't know how i can handle the CSVHelper to set to read quotes in the header reader.
...
0
votes
0answers
15 views
Scrapy exporting data in multiple cell
I am using scarpy to extract data from line using spider, But having issue that while yielding the result it saving brackets of list in a cell
here is my spider
from scrapy.spiders import Spider
...
-2
votes
0answers
6 views
how can I count my lines in my homework helpp
with open(filePath, 'r') as f:
csvreader = csv.reader(f)
for line in csvreader:
if question2 == "Chilly" and line[1] == "Chilly":
...
0
votes
1answer
20 views
Change part of csv string panda
I would like to change the word consolidation (two times in the following string) with an other value with a variable or ? (ex. breakout/outofconsolidation/inside)
Can I help me to achieve this, ...
-2
votes
0answers
34 views
How to write a null value in CSV? [closed]
I'm doing a search in the database and showing on the screen, some fields are coming empty due to errors at the time of registration, when presenting the data everything is fine, but when I try to ...
-2
votes
1answer
37 views
How to find prime numbers from CSV file in Java?
I need to create a program that reads any number of comma-separated integers from a file and processes the numbers.
It also must specify if each number is prime or not; if the number is not prime, the ...
0
votes
1answer
33 views
Spark dataframe with strange values after reading CSV
Coming from here, I'm trying to read the correct values from this dataset in Pyspark. I made a good progress using df = spark.read.csv("hashtag_donaldtrump.csv", header=True, multiLine=True),...
-1
votes
0answers
23 views
Ruby unable to parse CSV after encountering MalformedCSVError that is rescued
I have following code:
CSV.open("File.csv", 'r+', { :col_sep => ':' } ) do |line|
loop do
malformed_csv = false
begin
account = line.shift
rescue CSV::...
0
votes
0answers
37 views
How to get sorted input from an csv file?
I have a problem according to taking and fetching input from a CSV file, let's say for example I have a CSV file as follows:-
product_name,category
canon camera,DSLR
hikvision camera,security
cp plus ...
2
votes
1answer
34 views
How to verify if first line of CSV file matches the header names?
I would like to process CSV file of such structure:
header1,header2
val1.1, val1.2
val2.1, val2.2
But only if the first line contains both header names - otherwise throw an exception.
My current ...
0
votes
1answer
12 views
Is there any way to convert an NDJSON file into a csv file using SSIS? [closed]
My basic requirement is to convert an .ndjson file into a .csv file and then load into an MS SQL Server table.
The files which I want to convert and load are given in the below links
https://bcda.cms....
0
votes
1answer
20 views
Importing CSV with 60k columns into BigQuery
I have a few CSVs that have 60k+ columns that I'm trying to import into BigQuery. But when doing so, I get the following error:
Too many values in row starting at position: 0. Found 65535 column(s) ...
-4
votes
0answers
29 views
the fastest way to read multiple files java [closed]
I have 5 csv file that has millions of line.
I want the fastest way to read 5 file.
I tried to read 5 file at same time with 5 threads to reduce time (not sure that works).
but some lines didn't read ...
0
votes
1answer
42 views
Fortran90 - compiled program creates a blank csv file instead of reading the existing one
In short: I am trying to load a csv file but the program always overwrites the existing file as an empty new file.
Longer: I am pretty new to Fortran, so bear with me. I am trying to read data from a ...
0
votes
0answers
19 views
decoding utf-8 from csv list
I am having this little problem with decoding nested list from csv file. I can't write to csv because of unicode error so I have to encode it but when I want to decode it I get this error: ...
-1
votes
0answers
11 views
Keep getting an error whenever I try to load the CSV into a dataframe in juypter notebook [closed]
enter image description here
Every time I try to load the csv file into the data frame I keep getting this error. Pictures linked.enter image description here
-1
votes
1answer
16 views
Import data from CSV to a table in Oracle with NodeJs
I have a doubt.
I would like to know if it is possible to insert data (100K data) that I have in a CSV file, directly to a table in Oracle, using NodeJs.
I have looked for several ways, but I have not ...
0
votes
0answers
17 views
How to read a csv file with Networkx
I am trying to read a csv file with Newtorkx, but when I try to graph the network the output is a blank network. Anyone has any idea of what might be wrong with my code>? Thank you!
import ...
0
votes
0answers
35 views
Appeding in CSV file with other code in the middle [closed]
How can I append values in the same csv files when there is other code in the middle? I have tried opening and closing the file multiple times and I have also tried opening the file just one time. The ...
2
votes
1answer
24 views
d3js v6 reading multiple csv with Promise.all returning 404
I am new to working with d3 and loading in data, and I had an error I could not find any solution for.
I am trying to read a few csv files at once, filter them, and allow for them to be used later on ...
0
votes
1answer
32 views
Cleaning CSV with tweets for using it in Pyspark
I'm using this dataset https://www.kaggle.com/manchunhui/us-election-2020-tweets with Pyspark in order to process it and get some trends according to the tweet's location. But I'm having a problem ...
0
votes
0answers
22 views
Memory issue reading a .csv file and allocating the data into a multi-dimensional array using C
I should preface this by saying I have absolutely zero experience with C. However, I need to use it to write a UDF for a CFD simulation I'm doing.
My problem is that I have to read a .csv file and ...
-3
votes
3answers
33 views
Printing a csv file in python
Data
Data - [DataFrame][1]
Hello there. I am a little newbie in python. I need to edit the dataset in the picture. But since there are 22 million lines and it is forcing my computer, I wanted to ask ...
0
votes
0answers
20 views
Reading and using data from a .csv file in QML
I am trying to import a .csv file and then use data that are located in the .csv file. I have several problems. Before the start, I should add a sample of the data.csv file, which makes explaining ...
-1
votes
0answers
9 views
Load Pandas DF to BigQuery fails
Load Pandas DF to Big Query fails
I would like to know how the solution in the above link worked and how did the job config configured.. i get the error schema ia not matched error.
0
votes
1answer
25 views
Markdown function for multiple csvs stored in same folder
I have a written a function in r markdown. I want to run the below on a number of different csvs stored in the same folder.
How would I therefore go about creating a generic function [in place of the ...
-1
votes
0answers
17 views
Generating daily basis csv file from a hourly basis csv file [closed]
I have to reduce a csv file with data for each hour during a month to a csv file with an average per day
The first row of my data base look that :
20 200 202 170 000,1.10938,1.10938,1.10938,1.109389
...
0
votes
0answers
20 views
Error when trying to read data from imported csv file
I tried to adapt the code from this answer to my own app (specifically to the answer given by user "theDuncs". I'm trying to create a way for the user to select a .csv file, and then the app ...
0
votes
0answers
8 views
How to convert mbox into csv format using python?
I am writing to convert email Mbox format into CSV using Python 3
import mailbox
import csv
writer = csv.writer(open(r"...\clean_mail.csv", "w"))
for message in mailbox.mbox(r'...\...
0
votes
0answers
22 views
Groovy: Export of data in several files instead of just one file [closed]
I want to export data from Grafana with Groovy. Therefore I have this script which works out fine:
JsonSlurper slurper = new JsonSlurper()
println "Collect list of servers:"
def result = ...
0
votes
0answers
11 views
MySQL import wizard isn't importing the COMPLETE data
I used MySQL workbench's import wizard to import data from a csv file. The import was successful but not all the data rows were imported. My csv file contains 271,117 rows but only 270,396 were ...
0
votes
0answers
37 views
Looping through multiple columns in a CSV and consolidating to one
I just started learning python a few weeks ago and am excited about the challenging journey ahead. I want to thank you all in advance for the help I'll receive directly and indirectly. Here's my ...
0
votes
1answer
49 views
How to show nested dictionaries in CSV file
I have dynamics field and I need the CSV file shows field in its column, you can see in this image, the dynamic fields shows literals {} brackets and show all of them in one row, I need to separte in ...
0
votes
1answer
30 views
Converting JSON to CSV and CSV to JSON with custom headers Javascript
I'm struggling to find a good way to achieve import/export features supporting csv format without external libraries. Anyone that could help me on that would be a lifesaver. Really!
I have a csv ...
0
votes
2answers
16 views
Read all Excel workbooks in the same directory each with multiple sheets and export each sheet as a .csv in R
I am trying to read all sheets from multiple workbooks and then export each sheet as its own .csv. I ran this code:
files.to.read <- list.files(path = "/Users/filelocation", pattern="...
-2
votes
0answers
31 views
Convert CSV to YAML using c++
I have this project where I am given some code (added below) and some csv data and asked to modify the code to allow me to convert the csv to valid YAML data. I am stuck as I don't know what I have to ...
0
votes
0answers
31 views
SQLite: Comma Separated Values To New Table & Columns
I have a SQLite table:
fileId | path
1 /video/gopro/father/mov001.mp4
2 /pictures/family/father/Oldman.jpg
3 /documents/legal/father/estate/will.doc
I want to separate this ...
0
votes
2answers
26 views
Reading CSV file with Hebrew content
I'm trying to read CSV file with Hebrew content and I'm getting gibberish content.
When I open the file in Excel I see the Hebrew content correctly.
function loadDoc() {
readTextFile(function(csv) {
...
0
votes
3answers
41 views
Index out of range even thought element exists
I have csv file with list of servers presented like this:
929912,"172.83.40.219","System.Object[]","System.Object[]","Canada#944","ca944.nordvpn.com",...
1
vote
2answers
19 views
How to write into this DataFrame?
I'm trying to call open_and_read_file function whenever I need to read a csv file during in my code. I added it to my code here:
class EmployeesList(object):
def __init__(self, list_of_employees):
...
-1
votes
0answers
49 views
Reading multiple csv files from S3
I am writing a program which receives 6 csv files and then transform them into data frames to process the data.The result is put into a csv file in another bucket. My files are in a S3 bucket. When I ...
-1
votes
1answer
16 views
Ansible Error when using dict with csv: "The task includes an option with an undefined variable. The error was 'dict object' has no attribute 'schema'
I'm trying to get my playbook working with csv while using a dict due to the nature of the data [each task asks for different parts of the data in a row so i can't use a list?].
BD and EPG always will ...
0
votes
0answers
27 views
Errors when trying to read csv file into pandas data frame
I am fairly new to working with Python so forgive me if this is an obvious issue but when attempting to read my csv file into a data frame I get the following errors:
Traceback (most recent call last):...
-2
votes
0answers
17 views
Create the lists of parameters from multiple json files
I am new in data engineering.
I have a csv file generated by a weather station initial csv file printscreen. I need to construct a data model in json format based on the data in the initial file and ...