Questions tagged [read-csv]
The read-csv tag has no usage guidance.
read-csv
87
questions
0
votes
1
answer
24
views
pandas' skiprows speed/efficiency
I've got huge csv files and a few thousands of files (each file running into Gbs and some running into Mbs). However, my interest is only the last n rows (say 50 records) of each of these files. My ...
2
votes
1
answer
54
views
Contradictory error when using Polars read_csv() with multiple files for csv.gz
I'm trying to read multiple csv.gz files into a dataframe but it's not working as I expect.
When I use this globbing pattern:
pl.read_csv('folder_1\*.csv.gz')
It returns this error:
ComputeError: ...
0
votes
1
answer
15
views
URL not loading in pd.read_csv however the file is read openly from browser
I am trying to get a csv using a link "https://nsearchives.nseindia.com/content/equities/eq_band_changes_16072024.csv" but it is not downloading.
`import pandas as pd
...
0
votes
0
answers
6
views
Issues with the on_bad_lines parameter in read_csv
In pandas, how to get the value when using pandas.read_csv() with the parameter on_bad_lines='warn'? Using standard output streams cannot obtain it.
Assigning the output information to a variable.
I ...
1
vote
1
answer
47
views
<Missing> Values in Cell Arrays Created from Matlab readcell()
I am uploading data from an Excel file which was provided in a specific format, for which a minimum reproducible example is shown below:
I am trying to save each column into an array, using the ...
0
votes
1
answer
50
views
Jupyter Notebooks read CSV - using JupyterLite from under 'Try Jupyter' page
I am using Jupyter Notebooks under "https://jupyter.org/try" to read my csv file. I tried the following methods, and none of them works. I installed and imported pandas as pd.
top3 = pd....
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 ...
-1
votes
0
answers
30
views
Getting This Error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate. I [duplicate]
I am trying to use the following code to read a CSV file, but I am getting an SSL error on PyCharm. How would I fix this? I have tried the following code but then get an error because read_csv() got ...
0
votes
3
answers
81
views
Pandas read csv simultaneously passing usecols and names args
When reading a CSV file as a pandas dataframe, an error is raised when trying to select a subset of columns based on original column names (usecols=) and renaming the selected columns (names=). ...
0
votes
0
answers
17
views
FileNotFoundError: [Errno 2] No such file or directory: '/content/gdrive/MyDrive/RMDS/CDA MEI 2022/ke12 Statistics Inference 2/datahouse_pricing.csv'
I have a problem to read my csv file from google colab, i stored my csv file at gdrive and copy that path as i use to read it and the csv file is found by list dir but it can't be open
enter image ...
0
votes
1
answer
34
views
Pandas data frame read_CSV: why automatically make first column data as index
I'm looking at sensor data with Pandas dataframes. The text file I have does not have an index field.
It starts with time data, but when I use this code to load data from a file into a Pandas data ...
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 ...
0
votes
1
answer
100
views
pandas read_csv silently not parsing separate date & time fields despite provision of date_format
I'm am reading a CSV file AirQualityUCI.csv containing date data [1]. Here are a sample of 10 lines, including the 1st line for field names:
Date;Time;CO(GT);PT08.S1(CO);NMHC(GT);C6H6(GT);PT08.S2(...
0
votes
0
answers
22
views
using Pandas reading a textcolumn longer than 4096 characters from csv
In my csv there is a JSON object, which could be longer than 4096 characters. The pd.read_csv seems to have a problem because i cannot convert this to a valid JSON object to read from.
I used pd....
0
votes
1
answer
68
views
Pandas read_csv with 'keep_default_na=False' causing change in data type of values. How to prevent this?
I'm trying to read a csv file which has 'NA' value as data. When I use the 'keep_default_na = false' option to keep NA values it's impacting other columns with empty rows.
The Data:
csv pic
colA ...