Most voted "csv" questions
CSV (Comma-separated values) is a file format primarily used by Spreadsheet or Database applications to represent a data table. Its main characteristic, as the name already says, is to use only values and commas in its structure.
Learn more…343 questions
Sort by count of
-
0
votes1
answer172
viewsHow do I pass values from a CSV to a JSON in Python?
I tried two ways to read a CSV file and pass the values in the JSON value parameter, but it does not return any result, if I pass the direct values, it works. Code 1: import boto3 from datetime…
-
0
votes0
answers39
viewsCell does not show all information(.CSV)
I am generating a file . CSV in my project in c#. Most information is correct, but when it has a large number, the cell does not show all: and the file is generated like this: Call the Create…
-
0
votes1
answer401
viewsPython mining (prediction using csv)
I am now starting programming in Python language and I am studying data mining with artificial neural network. What should I do to make predictions from a . csv file? Then how to save the results in…
-
0
votes1
answer74
viewsI cannot extract data from a specific column
My Dataframe has several columns and one of them is not being read when I try to use indexing (e.g., bar_0617 = media_0617['Bar']). The following error appears: Keyerror: 'Bar'. I do not know what…
-
0
votes0
answers119
viewsIndex column using data from my csv file
Good night to you all! I opened a csv file in python using the following command: caminhoarquivo = r'C:\Users\user\Desktop\teste.csv' basedados = pd.read_csv(caminhoarquivo,sep=';',decimal=',',…
-
0
votes1
answer60
viewsTensorflow CSV Data
Personal I would like to assemble my training_x and training_y from the CSV someone knows how to proceed, I started but could not finish. import tensorflow as tf from tensorflow import keras import…
-
0
votes2
answers162
viewsIdentify zero sequences in a csv file using python
good morning! I’m having trouble identifying sequences of zero in a csv file, using Pyhton. Below is an example of my csv file: Index | Ponto de Medição | Data | Hora |ZeroApply 0 | User1 |…
-
0
votes1
answer5223
viewsHow to manipulate CSV data in python?
I need to manipulate data CSV without using pandas or numpy. It has specific columns to manipulate, so how do I best go through the columns, do this data reading of each one and be able to work with…
-
0
votes1
answer112
viewsData Crawling in Python
Good afternoon, you guys. I decided to start my studies with the Python Crawler technique. I built the following script using lib Selenium : # Importando selenium para realizar o crawling from…
-
0
votes1
answer1245
viewsHow to create a CSV file via Python by keeping the decimal separator in the same place?
I have a Python script that makes a request via API and saves the data in a CSV file. The data is stored in different lists in Python and should be saved in different columns in the CSV file. The…
-
0
votes1
answer74
viewsRead data over file . csv
I have a PHP system reading data from a csv file. It displays the barcode number where I will relate to the database for update according to the file sent in the system. Example: User sends CSV file…
-
0
votes1
answer92
viewsError inserting CSV data into Mysql with Python
I am writing a Python code that inserts the data of a CSV into a Mysql table. if os.path.isfile('\\offline.csv'): try: csv = csv.reader(open('\\offline.csv', encoding='utf-8')) for row in csv: conn…
-
0
votes1
answer43
viewsString conversion problems reading data in CSV
Personal greetings. I’m creating a program that reads data from a csv file. I’m having trouble reading a String and converting to int, because in the String reading is not removed the quotes ("").…
-
0
votes2
answers100
viewsProblem inserting data into CSV file
I am inserting the data into the file correctly, but when I open the file in Excel, the data is all in the same field in the table. Follows the code: import csv dados = open('DATA.csv','w') try:…
-
0
votes1
answer24
viewsAdaptation of csv columns with DB fields other than hard code?
Boom day :) I’m doing a python script that reads a file. csv that takes a few columns (not all columns, just a few) and saves it in the database. As the columns of csv and the name of the database…
-
0
votes1
answer132
viewsError with append with python csv file
I have a code that sends information to a csv. When it runs the first time it writes the file normally, but when it runs the second time it should add a new line in the file it ends up overwriting…
-
0
votes1
answer255
viewsGenerate Python CSV from txt
I’m trying to run the code: import csv listaG = [] arquivoSaida = 'teste.csv' with open('Arquivos_avanco.txt', newline='') as csvfile: spamreader = csv.reader(csvfile, delimiter='-', quotechar='|')…
-
0
votes1
answer101
viewsPython - multithreading + csv
I’m trying to write csv files using a Thread for each file. Code iterates a list generated by groupby and calls a thread for each group. Calling the function directly files are saved normally:…
-
0
votes1
answer198
viewsRemove Columns from a . csv file with Javascript
Below follows my code for reading a file. csv using Nodejs, I would like to know how I can remove the "COMPANY" and "%" columns from the file 'file.csv', thanks in advance to those who contribute.…
-
0
votes1
answer111
views -
0
votes1
answer351
viewsCompression and Reading of CSV file with large-scale rows x columns via Pandas
I am stuck looking for a precise and intuitive way to read a file of 70.000KB formed by the concatenation of several files being them with varied sizes. Initially possessing several files in the…
-
0
votes1
answer132
viewsHow to handle "Nan" values returned from a Dataframe
I wrote the code below to select 1 column of each CSV file, but it returns all values like NaN. How I treat it so it returns the right values? import pandas as pd df1 = pd.read_csv("CSSS.csv",…
-
0
votes1
answer815
viewsSave array to python CSV
I wrote the code below to store some data in a dataframe, soon after I converted it into an array, but when saved the same in CSV file, the same jumps lines in saved file import pandas as pd import…
-
0
votes1
answer81
viewsGenerate a python array of multiple variables
Hello! I am trying to generate a function that reads imported data from a "csv" file and converts it to an array. The data of one column is integer, and of the other column is an intercalation of…
-
0
votes2
answers282
viewsPython - Remove elements from a list
I have a list in Python and I want to replace certain elements in it, already try to use the replace mode I found in the documentation, but I did not succeed because it cannot be used in lists. I…
-
0
votes1
answer150
viewsIgnore the header when inserting data from a csv file into a Java string array
Good night, I read a csv file and stored the information in a string array. The file from position 0 to 8 has string content, from position 9 to 29 has in its entire content. I need to compare if…
-
0
votes1
answer370
viewsProblem reading csv file that has comma and comma and comma
The code reads the file successfully until it hangs on line 6, which has a comma in the middle, I took the comma off line 6, and the err went to line 8 and so on. How do I read the file? ignoring…
-
0
votes1
answer257
viewsPython/Mysql - Exporting CSV files
Hello, I am developing an application to extract files from my database, in csv. The file is normally generated with the data that is in the database, but if I insert more data into the database, it…
-
0
votes1
answer153
viewsStore data from an array in a variable
I have a CSV file with the information as below: nome;cpf;ano;faculdade; Pedro Sampaio;45896588963;2010;fmu; Yuri Martins;45885485896;2012;uninove; Pablo Vittar;32585296363;2020;unip; I read this…
-
0
votes1
answer399
viewsFind equal records in two databases(csv)
In two files .csv, how can I know whether or not a particular user is in the files ? These files have a different number of columns, but they have in common some fields (columns), for example: NOME,…
-
0
votes1
answer100
viewsAccess data and change csv or txt with python
I have this script that does data negotiations, I took some examples from the internet but could not access the data, before recording in csv I need to modify some fields, for example, the field…
-
0
votes1
answer65
viewsDuplicated, how to pass more than one parameter?
I have two CSV, I want to compare more than one field using duplicated. Is there a way, or can I just pass one parameter at a time? I followed the direction of Clayton Tosatti and I got here, but…
-
0
votes1
answer110
viewsHow to create a CSV file with the pixel values of an image
I’m having trouble getting the data from the pixels of an image and write to a CSV file, follow the current code. The error is in the .writerow, however I cannot identify how to change to work.…
-
0
votes1
answer76
viewsPython - take csv values under certain conditions
I am new in python and am trying to get information from a CSV and pass to JSON. The CSV is of this format: QTD Produto Estoque_Limitado 20 pipoca 1 19 refrigerante 1 21 doces 0 "Stock_limited"…
-
0
votes0
answers504
viewsBULK INSERT in SQL Server with variable columns in CSV
Hello. I get *.CSV files from a program that measures ink tint. If the ink is solid I get a file with 15 items (spetrum at 45°angle), if it is metallic with 36 items (Spectrum at 25°, 45°, and…
-
0
votes1
answer195
viewsConvert JSON to CSV
I’m developing a tool that captures information from the github API and saves it to a file .json. Code: const axios = require('axios') const fs = require('fs') const data = require('./data.json');…
-
0
votes2
answers99
viewsRemove NA from a csv in R
Good morning, folks! I’m trying to pull out NA but the code is returning null. Follow my code below: Note: In case I need to leave only the columns Population and Area (sq. mi.). rm(list=ls())…
-
0
votes0
answers100
viewsHelp to translate captcha by using the python, csv and Tesseract language [closed]
I’m trying to make the recognition of these images, I’ve tried several types and I can’t identify with the tesserat because of the lines and scratches I get the site information below and can’t…
-
0
votes0
answers206
viewsshow more Abels(xticks) on x-axis in Pandas/Pyplot charts
Hello I have this data in a CSV file (here only two lines were written, but the real file has several). Ano;Mes;Valor;Qtde;Tipo 2013;01;3982168388.81;562405;C 2014;01;4332471647.33;570833;C When I…
-
0
votes1
answer33
viewsAttach only one line to a CSV file with pandas
I am making a login system using very basic csv tables, because it is not the purpose of the program. def criar_conta(self, respostas): framelogin = pd.read_csv('C:\TCC\Aplicacao\Arquivos…
-
0
votes1
answer25
viewsExport values from a php array to a . csv by inserting each value into a cell
I’m trying to create a function that stores the values of an array in a . csv file, but inside the . csv is stored only the level of the parent array, for example: ArrayArrayArrayArrayArrayArray.…
-
0
votes1
answer203
viewsHow to save requests return and save to . txt or . csv file in Python
I wonder if it is possible to save the return of a request in file . txt or . csv in Python. I need some NIST data and for that I made the following code: import requests from bs4 import…
-
0
votes0
answers16
viewsHow to correctly pass an authorization token in the header using Javascript and the Papa Parse library?
I’m using the library Papa Parse in Javascript to download some dataset in CSV format and then read the data. It was working perfectly until they implemented a token authentication in the database.…
-
0
votes1
answer28
viewsimports csv files automatically
I have a list of several csv files in a single directory it happens that every 5 min more file enters this directory file example:…
-
0
votes0
answers13
viewsSmartcsv Key Mapping does not change Hash keys
I have a CSV file that I interpret through Smartcsv. However, I need the keys names of the generated hashes to be changed, for use I am using Smartcsv key_mapping but it is not changing the names. A…
-
0
votes1
answer81
viewsPython 3 - CSV to Excel conversion problem with list output
Good afternoon. I am facing a problem while converting a CSV file to an Excel file, via openpyxl. The code structure aims to convert a PDF to Excel, and paste the PDF information into a Sheet from…
-
0
votes0
answers43
viewsConfusing data output in CSV
I am new in Python and am learning to analyze and write CSV files. I’m stuck in a problem I haven’t been able to solve for a few days: I’m trying to read a government database, also in CSV, take…
-
0
votes0
answers28
viewsValidate upload by csv only
I have a small form where I ask the user to insert a csv file, however if the user inserts a file with different format he simply lets it pass. I’ve tried everything, but I’m not getting it done.…
-
0
votes1
answer37
viewsValidate upload of csv files
I have a form that one of the fields asks for a file. The point is that only files . csv should be allowed, but I’m not getting the validation. Follow the code below with my last attempt. Filing…
-
0
votes1
answer94
viewsHow to import CSV files from a same level folder (and/or above) in Python?
I have already searched several topics here, unsuccessfully however. So, if there is already an equal question, please forgive me and indicate a solution. My project is articulated as follows:…