Skip to main content

All Questions

Tagged with
-1 votes
0 answers
38 views

Comparing Input Variables to Text (and CSV) Files - Python

I am trying to receive an input from a user in a Python program, and compare it with a text file. I am learning about comparing data files, and need some help. First I import the data: import csv ...
Tariq Tayebi's user avatar
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
1 answer
35 views

read in .csv files into a list using a character vector for filenames

I'm reading in a list of .csv files but they're coming in with a single column when in actuality the .csv files have many columns. How can I specify the delimiter is "," when using an ...
Geomicro's user avatar
  • 454
-2 votes
1 answer
64 views

Replacing a row value in csv with a value from a scrape function

I have a script that opens two csv files. It scrapes the links in venues.csv for an id value for a beer from a webpage, then uses that id to find corresponding data from the beer.csv and then writes ...
Tendekai Muchenje's user avatar
1 vote
0 answers
61 views

Add value in dictionary with inner dictionary [duplicate]

Could you please help with the following problem. I have a dictionary with the following structure: {'logtype16777217': {'Table_AmfSetID.csv': [], 'Table_QCI.csv': [], 'Table_body.csv': [], '...
TRP's user avatar
  • 43
0 votes
1 answer
50 views

What does happen when a python list is added as a row element in a csv file?

I'm structuring a csv CRUD in Python and eventually I needed to save Python lists in a "cell" of a table. The saving succeeded as I'm able to read the cell as the Python list that it is. ...
Geovani Lopes Dias's user avatar
2 votes
3 answers
80 views

List to csv Python

When I try to save a Python list in a csv, the csv have the items that I want to save separated by each character. I have a list like this with links: links = ['https://www.portalinmobiliario.com/MLC-...
Rai's user avatar
  • 43
1 vote
1 answer
46 views

Join Folder Path to File Name from .csv Import

I am trying to write a program that will take in a CSV file containing 1 column of file names, append a source,then destination file path, then move those select files to the destination folder. Csv ...
Skynet's user avatar
  • 13
-3 votes
3 answers
145 views

How to filter list in python based on index value?

Let's say I have 2 lists documenting the number of apples each person eats per day: people = ['George', 'George', 'George', 'Dana', 'John', 'John'] apples_eaten = [5, 1, 3, 4, 3, 3] In this scenario, ...
Summer's user avatar
  • 9
-1 votes
1 answer
31 views

Python: Generate new Lists with Random Unique Numbers using a given Dataset Progression

I have the following lists (as a dataset in a CSV file). Some lists contain consecutive, non-repetitive integer numbers and others contain non-repetitive integer numbers. If we observe, there is a ...
user136819's user avatar
0 votes
4 answers
75 views

split by comma and ignore if comma in quotes a data from List of Tuples - Python

I have a list of tuples. lt = [('051623', 'O143', '1.23', '2023-05-16T18:30:00', '1M allen', 'millan'), ('051623', 'O207', '1.23', '2023-05-16T18:35:00', 'nM Mn, 4nM, 35uM Fe', 'wilo')] Need to ...
M Raj's user avatar
  • 23
-2 votes
1 answer
60 views

Python write elements without comma and brackets

I have a list of names as elements in an array (read from a csv file), I want to split the names at the spaces and write it into a csv file. But whenever I do it, it writes it always with brackets and ...
Santos's user avatar
  • 35
-1 votes
2 answers
64 views

Python csv file not printing properly, for Text Based Game

So creating this text based game, currently just sorting out some fundamentals, when printing out the classes stats the knight class prints out totally fine but the mage class for some reason prints ...
Extrovelent's user avatar
0 votes
1 answer
39 views

`.merge()` with a list in column

Is it possible to pd.merge() a df and csv when the df column is a list (could be more than one variable) and the csv only one. df GV2015_VAL polName 0 605000.0 ...
arkriger's user avatar
  • 242
-1 votes
1 answer
372 views

How to make the width and height bigger in csv output file

I've tried to search online, but with no sucesess. I have an output code which I try to export as csv file after modulations. When I open the exported file the width and height are just too small it ...
Noy Bechar's user avatar

15 30 50 per page
1
2 3 4 5
110