Skip to main content

All Questions

Tagged with
0 votes
3 answers
53 views

Reading CSV Files And Stripping Values

I am currently new with coding in Python with CSV files, and need help with the following code: import csv import random # Initialize an empty list to store the CSV variables CSVars = [] # Read the ...
Tariq Tayebi's user avatar
0 votes
2 answers
81 views

Ignore trailing commas in CSV file when using CsvHelper?

I need to read a CSV file with a trailing comma at the end of each line: column1,column2, // header value1,value2, // values Note that the CSV file has only two columns. However the trailing comma ...
me.at.coding's user avatar
  • 16.6k
0 votes
2 answers
86 views

importing weird string csv as float

U_d = pd.read_csv("Uzud.csv", decimal = ',') print(U_d) what comes out: f in kHz U in mV Amplitude in Vpp entfernung in cm 43.7 52 1 5.0 9.0 ...
T.Stark's user avatar
0 votes
0 answers
26 views

I have a problem in using pandas.read_csv() reads a big csv file

Using pandas.read_csv() for reading a csv file which is 7GB in size , it takes long time and consumes 40GB+ memory, and even consumes more. I am running on a win PC have 48G memory. sc_ge = pd....
DW_feige's user avatar
1 vote
1 answer
48 views

Pandas read csv where with id in column 1, headers in col 2 and values in col 3? [duplicate]

I have a data in CSV in below format: "/some/page-1.md","title","My title 1" "/some/page-1.md","description","My description 1" "/some/...
Roman Krylov's user avatar
0 votes
2 answers
128 views

Problem when reading a CSV file using Java

I am facing a problem reading my CSV file with Java. The java code I am using to read the CSV file is: package collectData; import java.io.FileReader; import java.io.IOException; import java.io....
Mouad Thf's user avatar
0 votes
2 answers
88 views

When reading a csv file through pandas, all columns become a single column

I am unable to print a DataFrame from a CSV file. It was originally in text format, but I converted to csv through the online site. So the file looks like this: CSV code: "clientId,timestamp,log&...
Артём's user avatar
0 votes
1 answer
60 views

Best way to remove dataframe columns where every value is the same

Let's say I have a DataFrame with multiple columns where the values are all the same e.g. df = pd.DataFrame({'State':['Texas','Texas','Texas','Texas'], 'County':['Harris','Harris','Harris','Harris'], '...
Richard Downhard's user avatar
-1 votes
1 answer
93 views

MIME type for reading CSV file in an Android app does not work

maybe I can get help here. I'm working on an Android app in Java and try to pick a .csv file to import some data: public void onButtonImportClick(View view) { Log.d(TAG, "...
reichi's user avatar
  • 41
-2 votes
1 answer
44 views

read_csv2 is multiplying some integers by 1000, affecting only the sum() function, how do I correct it?

I'm reading data from an excel spreadsheet with read_csv2 (the data is using ; as a separator). There's only two columns, let's call them product and count. count is always an integer or NA. My ...
Théodore Targerian's user avatar
1 vote
3 answers
70 views

can not separate csv file with thousands and comma [duplicate]

I need to read csv file with comma and also string and numbers but number contains comma in it like 1,260. Also csv file is seperated by comma so i can not read file in right way. How could i ...
crawlers's user avatar
0 votes
0 answers
135 views

Read csv file into R with commas between single and double quotes

I am trying to read a csv file into R that looks like that: """V1"",""V2"",""V3"",""V4"", ""V5""...
amitte's user avatar
  • 13
0 votes
1 answer
594 views

Pandas on Linux importing UTF 8 (BOM) csv with BOM header as cleartext in column names

Difference on importing csv data on Linux and MacOS Hello everyone, when importing a csv file with pandas.read_csv using UTF8 (BOM) encoding under Linux, the first column name contains the BOM as ...
Jan Jansen's user avatar
-1 votes
1 answer
34 views

Fix try loop always going for except - else

In this "try,except,else" loop, basically i didn't understand why it will always pick french_words.csv. IIUC, if the words_to_learn.csv exists, then it will use that csv file, and if not, ...
Subham Pal's user avatar
-2 votes
1 answer
63 views

How does read_csv read a csv UTF-8 file

code snippet How to rectify this error. I want to read the data in excel correctly and print as a dataframe. The raw data was copied from UCL repository into an excel file and saved in csv utf-8 ...
Rachel's user avatar
  • 1

15 30 50 per page