Click here to Skip to main content
15,892,746 members
Everything / CSV

CSV

CSV

Great Reads

by Daniel Miller
This article describes the C# implementation for a high-performance user/role security principal hierarchy.
by Andrew Kirillov
The article demonstrates usage of ANNT library for creating convolutional ANNs and applying them to image classification tasks.
by Glenn Prince
In this second part of the Data Cleaning with Python and Pandas series, now that we have a Jupyter Notebook set up and some basic libraries initialized, we need to load some data. To do this, we’ll load data from a CSV file, as well as from a local SQLite database.
by chlohee
Machine Learning. What languages come to mind? R? Python? Matlab? Bet you didn't think Visual Basic.

Latest Articles

by Cinchoo
Tip to deserialize JSON to polymorphic classes without type information
by Federico Di Marco
Query Excel or CSV files with T-SQL without importing them in a table first
by chlohee
Machine Learning. What languages come to mind? R? Python? Matlab? Bet you didn't think Visual Basic.
by Mirzakhmet Syzdykov
Develop programs with open storage using pre-defined format

All Articles

Sort by Updated

CSV 

8 Mar 2024 by Cinchoo
Tip to deserialize JSON to polymorphic classes without type information
24 Oct 2023 by Federico Di Marco
Query Excel or CSV files with T-SQL without importing them in a table first
9 Sep 2023 by chlohee
Machine Learning. What languages come to mind? R? Python? Matlab? Bet you didn't think Visual Basic.
26 Jun 2023 by Member 9950545
I have a json file which should be converted to excel file. I used the Data-> From other resources option but I don't have json option in that but as suggested in online I tried "from web" and gave my json file path but it is not traversing...
26 Jun 2023 by CPallini
Had you a look at this: How to Import JSON to Excel? - Great Learning[^] ?
24 May 2023 by Mirzakhmet Syzdykov
Develop programs with open storage using pre-defined format
21 May 2023 by Rebecca2002
Hello so I have this csv check that breaks when the zipcode isn't in the csv. pretty logical because my csv file is really big (around 12000 lines). but I don't know what else to do. so I'm using cookies because I want to show the results in my...
21 May 2023 by OriginalGriff
Erm ... you look at each row, and either set a cookie and exit (if the user is found on this row.), or set a cookie and continue to process the loop if not. So, assuming users are unique and you have say 1000 rows of CSV data, you will set...
3 May 2023 by Rebecca2002
So I know that both php and javascript work with cookies and you can create a cookie in php and use that one in javascript. now I have this code // csv code werkt wel tot ik de set cookie gebruik om $csv_file =...
3 May 2023 by Member 15627495
Hello ! you can get the value 'user_input' of the cookie with // JS : var people = Document.cookie['user_input'] ; // cookie works with 'key => value'. // and like Array too, associative Arrays or indexed Array var people =...
1 May 2023 by Richard MacCutchan
Changing the test from AND (&&) to OR (||) your loop is still incorrect. If one item in the row contains the correct Zipcode then you will report the input as correct. But you have not checked that both correct fields exist in the...
1 May 2023 by Rebecca2002
So I'm busy to compare user input with my csv but I get this error and tbh I don't understand why Warning: foreach() argument must be of type array|object, bool given now hear me out I know that it says that the argument needs to be an...
1 May 2023 by OriginalGriff
If you look at the documentation: PHP fgetcsv() Function[^] it shows the return value: Quote: Return Value: An array with the CSV fields on success, NULL if an invalid file is supplied, FALSE on other errors and on EOF So if there are errors in...
28 Apr 2023 by Richard MacCutchan
Your csv handling is incorrect, as shown in the following code: foreach ($row_data as $item) { // Check if the item matches either of the user inputs if ($item == $zipcode && $item == $Housenumber) { The $item field...
28 Apr 2023 by Rebecca2002
Hey I don't really have an error for this one but if I want to check if user input is in the csv my code stops working. no errors, nothing and I don't understand why?? so this is the backend
28 Apr 2023 by OriginalGriff
Getting your code to run at all does not mean it is right! :laugh: Think of the development process as writing an email: compiling successfully means that you wrote the email in the right language - English, rather than German for example - not...
19 Apr 2023 by Richard Deeming
Check the documentation: PHP: fgetcsv - Manual[^]: Returns an indexed array containing the fields read on success, or false on failure. The error message tells us that the function returned false, meaning that it failed to parse the current...
18 Apr 2023 by Rebecca2002
I am trying to find out in my users input is in the csvs but its not really working. I need an easy and quick way for this because my files are pretty long. i found this code: // Set the path to your CSV file $csv_file =...
17 Apr 2023 by Mark H Bishop
Computational classes and a GUI interface to illustrate usage
27 Mar 2023 by istudent
How do i read and import piple delimited files to the database. File has data which has line break.� I tried SQL Sever File Import wizzard as well as CSV Helper Library. Could you please help me how do I read the data successfully which has line...
27 Mar 2023 by PIEBALDconsult
Behold the power of Regular Expressions! System.Text.RegularExpressions.MatchCollection mat = System.Text.RegularExpressions.Regex.Matches ( @"123|John|Subject: Meet the new interns Dear team, I'm happy to inform you of the commencement of...
27 Mar 2023 by istudent
I am consuming the file and I have no control over the file. At this point I am trying to write my own logic. Thank you sir.
27 Mar 2023 by OriginalGriff
The problem is that it's "badly formed" CSV data - not the pipe character instead of comma, but the lack of double quotes to delimit multiline strings. When you want to use "broken strings", you have to use double quotes around all string...
10 Mar 2023 by Shao Voon Wong
Read/write CSV in few lines of code!
6 Mar 2023 by Mandavali
I have a nested json that I am working on converting to csv here is section in it that is not in Square bracket, that I would like to iterate.. How do I do that to get the data "answers": { "1": { ...
6 Mar 2023 by Richard MacCutchan
See ConvertFrom-Json (Microsoft.PowerShell.Utility) - PowerShell | Microsoft Learn[^] and ConvertTo-Csv (Microsoft.PowerShell.Utility) - PowerShell | Microsoft Learn[^].
9 Feb 2023 by aravindnass
When I tried to upload my CSV file that contains a value '00E1' showing a '0' value after uploading. The 00E1 value is a Name, so I want it as '00E1' not a 0 value in Big Query. For Eg - 1. I opened an Excel sheet, and format a column as...
26 Jan 2023 by George Smith Jan2023
I do not want the answer to this but I would like to know how to work it out. If someone can explain it I would appreciate it. I've got a list of grades for students that I need to get a UCAS score. See image Write a Python application which...
26 Jan 2023 by OriginalGriff
First, learn Python. Without at the very least the basics, you will never get this done - "guessing and hoping" is not a successful development strategy! Then think about how you would do it manually and get that sorted in your head before you...
5 Jan 2023 by W. García
Turn Microsoft Office applications into a masterpiece for cleansing, reshaping, managing and analyzing data from CSV files. No more intermediary spreadsheets, no more headaches due to DLL updates that make your implementations stop working, the pure VBA solution is here.
16 Nov 2022 by Member 11212591
hi i try import csv file to database sql server without header this code work good but with header how can skip the header what the code that delete or ignore to import csv with out header to database in c# windows application my csv format below . thank you...
15 Nov 2022 by Mushaik Mohamed
In my c# application i have to load a csv file to DataGridView and in my csv file have single quotes in person ID( ' ) how to remove single quotes from datagridview ('), can anyone help me please? What I have tried: String name = "exx"; ...
14 Nov 2022 by OriginalGriff
You would have to process the data and remove it manually from the DataTable once it was filled: either that or list the columns you want to select, and use Access's RIGHT function to remove it before it reaches the DT: String functions and how...
31 Oct 2022 by David Vazquez Bande
I have the next code for elem in root: for nodo in root.iterfind(".//*[@type_id='1']"): print(nodo.attrib) What I have tried: With that code the show me this ( it is only a part of the result): {'id': '1372839298', 'event_id':...
31 Oct 2022 by Richard MacCutchan
You have all the information in the printed results. The nodo.attrib is a standard Python dictionary of all the attributes of the node. See Built-in Types — Python 3.11.0 documentation[^] for the methods of dictionaries. [edit] Starting with a...
27 Oct 2022 by David Vazquez Bande
i have this type of code xml:
27 Oct 2022 by Richard MacCutchan
I have created a test XML file and can find the nodes with the following code: for nodo in root.iterfind(".//*[@type_id='1']"): print(nodo.tag) See xml.etree.ElementTree — The ElementTree XML API — Python 3.11.0 documentation[^] for full...
14 Oct 2022 by MR-XAN777
I have a CSV file that has data about users. and I want to filter them by name endings. it is an example of my CSV file: index, name, id, status 1, John, 500, online 2, Anne, 485, offline 3, Angel, 856,...
14 Oct 2022 by Richard MacCutchan
filtereddf.to_csv('output_filt...
13 Oct 2022 by MR-XAN777
I have a .csv file that has data like that: index, name, id 1 john 512 2 Anne 895 3 Angel 897 4 Lusia 777 So I want to filter them by name endings and get names only which have vowel endings. And the result...
13 Oct 2022 by Sandeep Mewara
Did you try something like below. Filtering: df[df.name.str[-1].apply(lambda x: x in ['a', 'e', 'i', 'o', 'u'])] Refer: Lambda and filter in Python Examples[^] Saving to CSV: df.to_csv('new-location\\output_filtered_sample1.csv', index=False,...
28 Sep 2022 by Cinchoo
Tip to merge different CSV files into one CSV file using Cinchoo ETL
28 Sep 2022 by Cinchoo
Tip to merging JSON array values to single CSV column
27 Sep 2022 by Cinchoo
Simple fast lite CSV file reader for .NET
28 Jul 2022 by Member 15720520
I have a question from a company, the question says I have to implement z-score and minMaxScaling to read a csv file and do some calculations with BigDecimal so, I create a new class that implements Normalizer interface to deal with z-score and...
20 Jul 2022 by Allysha April
Is there a way to convert the number back to it's original format without having to manually change it within csv? the format within the csv is general and i know by changing it to number it turns back to original but is there a way to fo it...
20 Jul 2022 by Maciej Los
Well... If cell with scientific notation holds only 1.00004E+11, then you've got a problem. Why? Because 1.00004E+11 means 100004000000. If this cell holds 100004438998 value, but uses scientific notation, you're able to save its original value...
11 Jul 2022 by OriginalGriff
What I'd suggest is abandoning CSV format: it's very old, and as such it's pretty basic. A better idea might be to Output Excel data as JSON - Office Scripts | Microsoft Docs[^] as you have a greater range of outputs than just "number" and...
11 Jul 2022 by Patrice T
Quote: How do I convert the scientific notation to it's original number? The scientific notation: 1.00004E+11 The original number: 100004438998 In this case, you can't. Because your initial conversion to scientific notation have lost a part of...
27 Jun 2022 by Will Sewell
I'm trying to only display CSV files when I open the file dialog instead of CSV and XML. I have attempted to do this like this: private void button_OpenImportFile_Click(object sender, EventArgs e) { ...
27 Jun 2022 by OriginalGriff
First off, correct your code so it compiles: C# is case sensitive, so OpenFileDialog_Import is not the same as openFileDialog_Import: OpenFileDialog OpenFileDialog_Import = new OpenFileDialog(); ^ | ... if...
27 Jun 2022 by Richard MacCutchan
See FileDialog.Filter Property (System.Windows.Forms) | Microsoft Docs[^]. Also, if I remember correctly the filter index starts from one rather than zero.
16 Jun 2022 by Member 4206974
A work for exploring the Asynchronous WEB Server, the SPIFFS File system and the exploitation of the dual core
11 Jun 2022 by behruz12
Hi maybe this help you: =lower(text) =lower(true)
11 Jun 2022 by Maniraj.M
Hi all i have an CSV format file that contains string "true" and "false" but that CSV file from Excel 2010 it automatically converts to Upper case.I need same as lowercase string.How to resolve the problem???Thanks in Advance
9 Jun 2022 by Allysha April
Hello, I am having trouble finding a forum for this issue. So I have to extract a few data within a csv file. Most of the data that I need are within double quotes but I am not sure as to how to read the strings. I don't want to split them by...
9 Jun 2022 by George Swan
When a separator character occurs inside a quoted string, the number of the double quotation characters is always an odd number. So step through a line one character at a time keeping a record of whether or not the double quote count is even or...
8 Jun 2022 by TheRealSteveJudge
It is assumed that you are parsing the csv file by using your own logic. I would like to recommend you an open source component like this A .NET library for reading and writing CSV files. Extremely fast, flexible, and easy to use. | CsvHelper[^]
12 May 2022 by OriginalGriff
Don't work from a DataGridView directly - use it's data source instead, which is often a DataTable loaded from a DB or file. That way, you separate the presentation details from the data storage and get more reusable code. And you can then use...
12 May 2022 by User 15393223
I have already a working code in WinForm but I want to write back in WPF but I cannot do it because I am new in WPF. Can you guys try to convert it to WPF? if (myGrid.RowCount > 0) { string...
20 Apr 2022 by Member 15609211
Hello, I have a .txt that goes like this: USA Arizona - New Mexico Interstate 40 Interstate 10 South Dakota - Minneapolis Interstate 90 South Carolina - Washington Arizona - California ...
20 Apr 2022 by Richard MacCutchan
You first need to structure the data into a form that pandas can process. See pandas.DataFrame — pandas 1.4.2 documentation[^].
20 Feb 2022 by Cameron Grant 2021
I am currently inserting data from a csv file (movie information) into a MySQL database using php. My connection to the database using Xammp is all okay and the initial bit of my code runs okay and inserting the directors into the director table...
20 Feb 2022 by Andre Oosthuizen
Your code is open to injection, maybe start working with PDO - See Tutorial That being said, you are making a reference to director_id but nowhere did you gave it a value? Maybe add it in this part of your code depending on the array number - ...
14 Jan 2022 by Cyber Noob
This is the error I obtain while running the below code. Traceback (most recent call last): File "E:\Anaconda Projects\Mongo Projects\SDR Tool\csvtojson.py", line 16, in jsonString = json.dumps(jsonArray, indent=1,...
11 Jan 2022 by Slow Eddie
I have a Large CSV file with over 100,000 rows. I have a long string I want to insert in front of the first value at the start of each row. The string to be added to the first value in each row is the same. The first value on each row is...
11 Jan 2022 by CHill60
Solution 1 gets my vote - I'm a fan of Notepad++ but if you do decide to go down the CSV suggestion in Solution 2 here is a far quicker alternative and this also fills in some of the gaps from Solution 2 * Insert a new column A either by...
10 Jan 2022 by _Asif_
You can easily do this in Microsoft Excel. Excel can open .CSV files. All you need to do is * Insert a new Column After A Column * Insert a new Row Before Row 1 * Copy the Blah Blah text @A1 * Put Formula on B3 = $A$1 & " " & A2 * Copy B3 to...
10 Jan 2022 by k5054
You could do it with Notepad++ : Notepad++ add to every line - Stack Overflow[^] You might be able to use PowerShell's replace method to do the job, too. There's an article here[^] on that. If you can't make replace add text to the start of...
13 Dec 2021 by Cinchoo
How to compare two CSV files for Add, Deleted and Changed records using Cinchoo ETL
13 Dec 2021 by Wi-Per
Dear all, At the moment, I need a syntax that changes the base name of the CSV files that are downloaded. I need that: When CSV's are downloaded, instead of a standardized name for all files, tell me the name of the distributor in question. ...
13 Dec 2021 by Chris Copeland
Assuming you're using this jQuery plugin[^] (correct me if I'm wrong) you just need to look at the documentation on that page to work out what you need to provide. These options apply only when the 'download' action is used filename default:...
2 Dec 2021 by klinkenbecker
Shows how to monitor a UPS, graph the details and shutdown the system
28 Nov 2021 by Master PC
It's a ASP.NET Core MVC. I want to upload an excel file so I can view it in a List View, but I am stuck there. User is supposed to upload the file and then populate it in the list. I previously wrote it on MVC, and I'm rewriting it in ASP.NET...
28 Nov 2021 by Richard Deeming
Your question is not entirely clear. If you want to read the lines from the uploaded file, you just need to open the stream and read the file: using (var fileStream = file.OpenReadStream()) using (var reader = new StreamReader(fileStream)) { ...
15 Nov 2021 by houssem eddine ayari
I have an SSIS solution where depending on a parameter, it launches the extraction of different databases, each in a different file, and the name must contain the date of the extraction so we can't hard code the name in the Destination wizard, I...
15 Nov 2021 by phil.o
Maybe that can help: sql - SSIS : Using a variable as the name of a flat file destination - Stack Overflow[^]
9 Nov 2021 by Derya Solak
{ "First Name": "Jonathan", "Last Name": "Thomas", "Marital Status": "married or civil partner", "Sex": "Male", "Age (Years)": 46, "Height": 160, } I have a 600 row data set which I gave the first row. import pandas as pd df =...
9 Nov 2021 by Wendelius
The content look like JSON object, not a line of CSV data. If that is correct, have a look at https://pynative.com/python-parse-multiple-json-objects-from-file/[^]
1 Nov 2021 by Cinchoo
Quick tutorial about converting JSON to CSV file using Cinchoo ETL
20 Oct 2021 by Cinchoo
Quick tutorial on converting CSV file to JSON file using Cinchoo ETL
19 Oct 2021 by Pablo Romanelli
I´m learning programming in phyton and i had to make a wordsearch generator. Ive made it but i need the result/array to be saved in a csv file. Ive tried a lot but cant seem to find out how, anyone can help me please? Thanks in advance. Sorry for...
19 Oct 2021 by Richard MacCutchan
See csv — CSV File Reading and Writing — Python 3.10.0 documentation[^]
7 Oct 2021 by Cinchoo
Tips to converting CSV to JSON with nested objects and arrays
29 Sep 2021 by Iris Shing
I got an error: There were 1 or more exceptions while reading data using type "CSVClass". Reading file "C:\Users\admin\Desktop\Project\Project\App_Data\demo.csv".Here are my code: if (filMyFile.PostedFile != null) { HttpPostedFile myFile =...
29 Sep 2021 by Member 15375990
It's an aggregated exception type, usually a busted column type,if you breakpoint the exception check the ineer exceptions list, you will find for example a list of errors like this: {"Value \"0\" in line 2 has the wrong format for field or...
12 Sep 2021 by Member 15355548
When I run this program with an actual gmail address and the correct password, the terminal output is: ➜ Program python3 mail.py Something went wrong... Something went wrong... Something went wrong... Here is the entire program file mail.py:...
12 Sep 2021 by Patrice T
Quote: How do I isolate a problem in a Python script when the terminal output is the print statement from the except block? By reading Python documentation for 'try' : 8. Errors and Exceptions — Python 3.9.7 documentation[^] If you dare to read...
24 Aug 2021 by Moldoveanu Marius
I'm trying to import from a csv file into datagridview a number that is longer than 15 characters.In the csv file it looks 8940012004412026012 and after import in datagridview show 8.9400120044120259E + 18 What I have tried: private void...
24 Aug 2021 by card_maruis
my solution was to format before insert to database for (int i = 0; i
23 Aug 2021 by card_maruis
I found a solution using csvhelper but now I discovered another problem with formatting the date I can't format it yyyy-mm-dd to add it to the database. If I change in Windouws the date format to yyyy-mm-dd the import works but I can't change it...
21 Aug 2021 by Afzaal Ahmad Zeeshan
Quote: In the csv file it looks 8940012004412026012 and after import in datagridview show 8.9400120044120259E + 18 That is just two ways of representing the same numeric value. Since the number is big, the output is being shown as an...
16 Aug 2021 by Member 12078840/divya
When i click Submit button .I need to get chosen csv file are upload in to mysql database table String MyCon = "SERVER=*****;" + "DATABASE=*****;" + "UID=root;" + "PASSWORD=******;" + "Convert Zero Datetime = True";private void...
11 Jul 2021 by Angela_Mary
Hi all, I am trying to plot a Gaussian fit for my data using lmfit Python. Right now, I have a folder containing 3 csv files. Each of the csv files have 2 columns (x-values and y-values). I am storing the contents of the x and y data in two...
11 Jul 2021 by Angela_Mary
import csv import pandas as pd import numpy as np from matplotlib import pyplot as plt from scipy.optimize import curve_fit from scipy import asarray as ar,exp import glob import os from lmfit import Model ...
11 Jul 2021 by W. García
To cover the need to import information from a CSV file directly into RAM, in an efficient, secure and stable way, from VBA, specialized libraries are needed to ensure the ease of use and integrity of the data.
8 Jul 2021 by Angela_Mary
I am trying to loop through a folder of 70 csv files. Each of the file has 2 columns which I want to store into two arrays (xData[] and yData[]). I have attached my sample code and I am unable to print the file name and my updated arrays. Kindly...
8 Jul 2021 by Richard MacCutchan
You could start by fixing the basic syntax and other errors: import os import glob import csv path=r"E:\Users\ConfocalUser\Documents\GitHub\qudi" files=glob.glob(os.path.join(path,'*.csv')) # add the second closing parenthesis here xData=[]...
23 May 2021 by Muhammad Nifhail Bin Zambri
I'm working on converting JSON files into CSV using ChoETL . So far the converting is working fine! My code is : var sampleJson = File.ReadAllText(@"C:\cpi\log\V510ResultsInfo\cpi001.json"); StringBuilder stringBuilder = new...
5 May 2021 by Carlos Conceição
Current features of NSimpleOlap library