Skip to main content

All Questions

Tagged with
1 vote
0 answers
68 views

Reformat and Convert xlsx to csv - xlrd.open_work workaround

I have a larger script that is supposed to read xlsx files, reformat and convert to csv files. But the code was written a few years ago and uses the xlrd module to open the Excel files but apparently ...
jcbritton's user avatar
0 votes
1 answer
11 views

Get 2 DataFrames into 1

Hi everyone so I have a DataFrame about Pokemon data data = pd.read_csv('pokemon.csv') And I'm only interested in 2 columns 'type1' 'type2' (type2 can be null) as the same way the original videogame ...
Ivan's user avatar
  • 21
0 votes
2 answers
1k views

Convert multiple .txt files to .csv files

I have multiple .txt files and I want to convert them to .csv files with the same name. The filename for these .txt files is something like this: 01-09-2022-something.txt 02-09-2022-something.txt 03-...
Siddharth Jain's user avatar
0 votes
1 answer
96 views

Write a list of lists into csv and having UnicodeEncodeError in python

I am converting an xlsm file to csv using the openpyxl library. I have the problem that when I try to pass the list of lists to the csv python returns the following error: Traceback (most recent call ...
Jordi Lazo's user avatar
1 vote
2 answers
243 views

Saving data in excel by cell rather than semi-colon with python

***Edit: I am originally saving the code to a .csv file but then later converting it to a .xlsx file. I am trying to change my code to save the values in separate cells verses in the same cell ...
user avatar
0 votes
0 answers
34 views

Interpret CSV with equal delimiter values in Python 2.7

I need to create the following solution, I have a CSV file that the delimiter is a comma (,), but in one of the columns this comma can come by error in the user registration. The CSV scenario is this: ...
user avatar
2 votes
3 answers
360 views

Zipping a list of folders with Python

everyone. I'm really new to Python, so I need some help here. I have a list of folders names inside a .CSV file. All these folders are inside the same path. I need to zip them individually (each one ...
Raphael Gomes's user avatar
0 votes
0 answers
90 views

How to load certain portion of file into memory and write it on a file in Python?

I have a csv file which generates dataframe for every second and stores it in it. It will have millions of values. How to load only certain part. Like only first 5 MB. Then next 5 MB in a text file.. ...
Uday's user avatar
  • 57
0 votes
1 answer
105 views

Unicode error in the tokenization step only when doing stop words removal in python 2

I am trying to run this script: enter link description here (The only difference is that instead of this TEST_SENTENCES I need to read my dataset (column text). The only thing is that I need to apply ...
sariii's user avatar
  • 2,100
0 votes
1 answer
440 views

Compare 2 csv files and check for first 2 columns, if it matches ask the user to decide to override or not and then proceed to next row

I have a use case where I have 2 CSV files with some rows in each CSV file, and they have three columns each. Compare the 2 csv files for first 2 columns and if it matches then ask the user input if ...
sab's user avatar
  • 1
0 votes
1 answer
30 views

Please help me out with translating this Python code [duplicate]

Please help with translate this Python code I am trying to figure out the meaning of this code and could not end up with a conclusion... does anybody know how this single line code is like when it is ...
최명진's user avatar
0 votes
1 answer
517 views

Add random noise in each value of CSV rows

I am trying to add some random noise to my csv columns except last column. This is my csv file: z-1 z-2 z-3 z-4 z-5 z-6 z-7 class 0.1305512 0....
Codeholic's user avatar
  • 302
0 votes
0 answers
74 views

Python read csv file

Help me! This is the error message UnicodeDecodeError Traceback (most recent call last) <ipython-input-8-6e197d6c2788> in <module>() 2 csv_reader = csv.reader(f) 3 ----> ...
Hùng Nguyễn's user avatar
0 votes
1 answer
680 views

How to insert values based on condition in column in the CSV file using Python?

I want to insert values from the list based on the condition, For example, Please find below my algorithm of the code using CSV module. out_file = open("c://Project//in.csv", "w") ...
sodmzs1's user avatar
  • 334
0 votes
1 answer
567 views

How to iterate over a list of csv files and compile files with common filenames into a single csv as multiple columns

I am currently iterating through a list of csv files and want to combine csv files with common filename strings into a single csv file merging the data from the new csv file as a set of two new ...
GeomorphicJosh's user avatar

15 30 50 per page
1
2 3 4 5
108