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
-
14
votes4
answers5814
viewsHow to read microdata from ENEM in R?
The INEP (Instituto Nacional de Estudos e Pesquisas Educacionais Anísio Teixeira) makes available for download the microdata of ENEM (and others) from this link. These microdata are the ENEM’s raw…
-
13
votes3
answers1955
viewsPre-process large text files in R
I am writing a script, which I will make public, to open the micro-data of RAIS (dehydrated, available here) in R using Monetdb. However the bank does not accept vígula (,) as decimal separator.…
-
11
votes4
answers28007
viewsHow to read CSV files in Java
I am developing a web application, where after the user uploads a CSV file, my java application needs to read this CSV. Preferably separate the data into fields, for example to add these into a…
-
11
votes3
answers3977
viewsOrganize data in Excel to open as table in R?
I have a file with 50 observations and 3 variables in Excel file (.xlsx), and turned to .csv. I used banco1<- read.csv("teste1.csv") to create the table in R, however my 3 variables appear in the…
-
11
votes2
answers930
viewsError "invalid input '.. 'in utf8towcs" with "read.csv"
I have a database on . csv that gathers posts from both Facebook and Twitter. For the reading of the bank in R, the code I have used is bancodedados <- read.csv("nomedobanco.csv", sep=";",…
-
8
votes2
answers1059
viewsHow to create a csv from a database and data query
I was able to create a perfect . xls file, but . csv can’t follow the code I used to create . xls $dadosXls = ""; $dadosXls .= " <table border='1' >"; $dadosXls .= " <tr>"; $dadosXls .=…
-
7
votes3
answers7634
viewsError importing CSV into phpMyAdmin
I need to import a file .csv for phpMyAdmin, but the special characters do not appear, nor the text that follows them. What may be the problem?…
-
7
votes1
answer480
viewsMerge CSV with Python
I have a collection of dozens of CSV files. Most of them share the same fields, but some have unique fields. I want to merge them, using Python into a single CSV file with a global cabling that…
-
7
votes6
answers19845
viewsHow to change the name of the pandas dataframe column?
I am using pandas to process a CSV file in the following structure: nome;idade Fulano;28 Joao da Silva;27 Maria;29 The reading of the file is done as follows: import pandas as pd df =…
-
6
votes1
answer22729
viewsHow do I export table in R in txt or csv?
I wonder how I do to export a generated data table within the R to format txt or csv?
-
6
votes1
answer4852
viewsWrite to a CSV file
I need my script write to a CSV file. It will open a CSV file that has the column created_at (date and time), after that, the variable will be "broken" and will be written in a new CSV file the day…
-
5
votes1
answer566
viewsBecause my program does not generate CSV in UTF-8 that can be read correctly by Excel, but Notepad generates
I have generated files .CSV in javascript, in UTF-8, but not read with the correct encoding in Microsoft Excel (generating invalid characters instead of accents, as if you were reading ISO 8859-1 or…
-
5
votes1
answer139
views -
5
votes1
answer3327
viewsReading accented CSV file in Python?
I am learning python3 and ended up getting stuck in the question of reading a simple csv file that contains the character 'à'. I’ve tried using Code, I find that I found through the internet but…
-
4
votes2
answers5264
viewsHow to import data (.csv) to R while maintaining the original format
I am trying to import data from Excel (already in .csv format) to R; the values contained in the files to be imported are in the following formats, for example 8509.80... To import, I am using the…
-
4
votes1
answer1219
viewsFilter and save to csv
I would like to perform a filter on R. I have a database with 5 variables and more than 5000 lines. One of my variables is "room", in which I have 29 room (ex:Sala1,sala2...). I would like to…
-
4
votes1
answer1952
viewsRead CSV file without needing to save it
I have following code: [HttpPost] public ActionResult importCSV(HttpPostedFileBase file) { if (file.ContentLength <= 0) { ViewBag.Message = "Nenhum arquivo foi enviado."; return View("index"); }…
-
4
votes1
answer1049
viewsHow to transform data imported from Excel (.csv) into time series
I imported an Excel database to R and I need to turn it into time series to be able to analyze it. However, when I am going to make the transformation to time series R changes the original values to…
-
4
votes1
answer518
viewsHow to upload data to Mysql faster?
I have a DER that represents an airport and I have to upload data from several csv. for example I have a 1-to-many connection, by plane for flights. If I have this table connected with the foreign…
-
4
votes1
answer5659
viewsGenerate csv output of python code
I hope you can help. I’m new to python and my question is this. I created a regex extracted from a file in csv the parts of the text I want. But I want to save the output of this function in csv to…
-
4
votes1
answer124
viewsHow to discover the CSV delimiter by PHP?
A CSV file can vary the delimiters. I’ve seen it used ; (point-and-comma), , (comma) and up to \t (tab). In PHP, I know it is possible to capture CSV values by informing the delimiter: $delimitador…
-
3
votes2
answers4811
viewsCreate CSV file from PHP
I want to create an XSV file from PHP. What I want is to be able to create columns and give background color to an element for example. I have the following: <?php header("Content-type:…
-
3
votes2
answers1863
viewsAndroid - How to export the database in a csv file?
I have an application that collects and stores information in a database, and the user can query this data within the application itself. However, I would like to insert a button to export the…
-
3
votes1
answer275
viewsImport . csv file to server
I am performing a task to import data from a . csv file to the server. I can already import the file all right on the server side, but each file contains about 25 thousand records and the user is…
-
3
votes2
answers1331
viewsCheck separator type in a CSV file
I rode a script for import of CSV with PHP but I’m having difficulty with checking the type of formatting CSV. I need to check if he’s separated by ,or ; or \t or : or |, but I’m not getting it.…
-
3
votes1
answer782
viewsRemove Blank lines in a Csv file
I have the following csv file and would like to remove the blank lines For example File . csv…
-
3
votes2
answers792
viewsFormat date and monetary value to save to database
I’m extracting data from a file .xlsx. converting them into .csv and showing it on screen. So far so good, however, I want to play this data in a database, using PHP, but for this I need to convert…
-
3
votes1
answer188
viewsReading of csv with Django
Well, I’m working with an open database, and it’s in CSV, I’m using DJANGO to read the CSV and so entering into the database... However is giving a flaw in the insertion of the first year,I’m trying…
-
3
votes2
answers96
viewsForms and Files
I’m making a form where I basically access a file .txt in the CSV format containing certain articles and their prices (e.g., cheese,2.10). The program presents the list in a table, and below appear…
-
3
votes1
answer928
viewsHow to save an XLSX (Excel) file instead of CSV?
Today I have the code below, which saves a file in CSV format. What I need to change to save in XLSX format (Excel)? public static void buildCSV(string filename = "resultado.xlsx") {…
-
3
votes1
answer118
viewsSearching for values with PHP - Is it possible?
It is possible to access a file . CSV, capture a value and search it in another file . CSV?! Example: Note: The images below are . xlsb files, but it’s just for demo, I’m using . csv files The code…
-
3
votes3
answers1153
viewsNext() in CSV Reader with Python 3
Hello, I am taking a course of Machine Learning/Classification and well it uses a CSV file in which one should ignore the first line of the file. So I made the following code: import csv def…
-
3
votes1
answer60
viewsExport . csv with complement of lines based on a fixed number
I have a table in Mysql of products. I need to create an export . csv of them. The products are in the bank as follows: cod produto valor pagina 123 caderno 1,00 1 456 lápis 1,00 1 789 borracha 1,00…
-
3
votes1
answer355
viewsParsing columns of numbers from a CSV file in C
Hello, Good Night I am with a file . CSV simple, containing only two columns, separated by comma and by the new line, as an example: 0.001,-9.623 0.098,2.540 1.000,-1.002 And I need to separate them…
-
3
votes2
answers460
viewsGenerate CSV with side-by-side results in PHP
I’m trying to get comparative results on a CSV generated in the php but I can’t stack side by side the way EXPECTED RESULT of the attached image. I made a code below that did not break the line when…
-
3
votes1
answer894
viewsPython Unicodedecodeerro in jupyter notebook. Working with . csv
I’m learning to manipulate files .csv in Python with the jupyter notebook. I extracted a file from the system, in csv, separated by commas, but when I opened I received this error: arqsb2 =…
-
3
votes1
answer557
viewsCount how many columns are in a C++ CSV file
I am doing a design of an electronic ballot box, and for that I need to read a csv file where there is information about each candidate. As this csv file has a lot of information that is not…
-
3
votes1
answer500
views -
3
votes2
answers65
viewsHow to convert a txt to csv in perl?
Hello, Little Boy. I am new to perl. I need to convert a txt file to csv. Follow the code I’ve managed so far. #!/usr/bin/perl my $filename = "interfaces.txt"; open(fh, $filename) or die "não…
-
2
votes1
answer8559
viewsHow to export a table to CSV using PHP?
I have a contact table, I would like to know how to export it to .csv using PHP?
-
2
votes4
answers6360
viewsBreak row into table cell in CSV format to be read by Excel
I have the following code that inserts a value in an excel cell for export context.Response.Write("aa\r\nbb\r\nccc"); /r/n breaks the line but writes in the cell below, would like to break the line…
-
2
votes1
answer255
viewsField separation in array
I have a string consisting of (enclosed quotes): "campo","outrocampo","maisumcampo" I need to separate these fields, without the quotes, into an array. What I’m doing is a $string = str_replace('"',…
-
2
votes1
answer197
viewsin R, Dec="," does not work in read.csv2
Good afternoon to you... I’m trying to import csv where decimals are separated by dots... or something like 2.5 I want when it’s time to import it to show up with a comma, something like that, 2.5…
-
2
votes1
answer347
viewsHow to compare dates that come from a CSV file in Ruby
Good staff I have a CSV file with some data on it in case this: Nome; Data; Salario JOANNA 1981-04-11 7519.07 LUCIMAR 1958-06-10 819.77 PEDRO 1976-05-11 83.43 JOAO 1989-03-12 867.5 CAIO 1954-02-13…
-
2
votes1
answer159
viewsHow to import CSV into Symfony2
I am trying to create a generic way to import CSV the $data represents a full line of csv data. I am trying to generate a answer to register the data using the form public function…
-
2
votes1
answer4663
viewsJavascript - Export to csv
How do I export an html table to a CSV file? In my code below I am saving the csv file, but when opening in excel does not present the column divisions. I would like to export directly to CSV. But I…
-
2
votes3
answers126
viewsOrganize data in excel
I have a file with 59 observations and with 93 variables in Excel file and turned to .csv. to create the table in R, however my 93 variables appear in the same column. How do I make them appear…
-
2
votes1
answer280
viewsExporting my database to CSV with PHP
I created a php code that performs a twitter search and saves the result (100 tweets) in a database. In this code, I also have the option to select all tweets from the database and export them to a…
-
2
votes1
answer687
viewsThe control number V0102 of PNAD does not correspond to the code of municipalities of IBGE. How to unite the banks?
Hello! I’m working with food safety supplements from pnad04, pnad09 and pnad13 IBGE and two other IPEA banks, one on municipal GDP ipea.pib and other on investments in social programs by…
-
2
votes1
answer578
viewsCompare fields in two datasets
Considering two sets of read data from type files *.CSV with the Pandas. Each set has only one field CPF Favorecido,where there are millions of records. Each data set is equivalent to one month. I…