All Questions
42 questions
3
votes
3
answers
133
views
Increase time efficiency when writing arrays to CSV file
I have the following code to amend two rows of "test_base.csv" with the entries of the arrays "a_temp" and "b_temp," saving the result into "result.csv." .csv ...
4
votes
2
answers
356
views
Read a file format with mixed CSV and non-CSV content
I have a file format that I need to read which contains blocks of CSV data interspersed by non-CSV (or at least, inconsistent CSV) lines. Other than the very first line of the file (which has comma-...
4
votes
1
answer
192
views
Fetch CSV file into pandas and send report of Spotify statistics
I'm relatively new and self taught in Python. I've written this code which gets a CSV file from a website, plays around with the data then creates an email with information gleaned.
I know this is too ...
1
vote
1
answer
352
views
How to speed up the search by patterns matching and modifying a DataFrame
I need to classify URLs from a DataFrame and modify it by exact match and contains conditions:
...
7
votes
1
answer
166
views
GUI that reads data and generates/ saves charts
I have a program that uses pandas to read csv files and then generates and saves graphical charts. I have been trying to follow the SOLID principles so I have tried to seperate responsibilities.
So ...
3
votes
1
answer
131
views
Manipulating Pandas Dataframe with vaccination data from CSV to display on matplotlib
I have some code that manipulates a Pandas Dataframe containing Covid-19 vaccine data and displays it on Matplotlib.
The data is here: https://covid.ourworldindata.org/data/owid-covid-data.csv (...
1
vote
1
answer
2k
views
Processing CSV files with filtering
I have 4 CSV files that i need to process (filter out Part segment and then merge them) but the problem is that they do not fit in my memory. So I decided to: [open - filter - write out] each one of ...
4
votes
1
answer
286
views
Reorder the Columns in a CSV File in Descending Order
I wrote a script to reorder the columns in a CSV file in descending order and then write to another CSV file. My script needs to be able to handle several tens of millions of records, and I would like ...
7
votes
2
answers
326
views
Concatenate several CSV files in a single dataframe
I have currently 600 CSV files (and this number will grow) of 50K lines each i would like to put in one single dataframe.
I did this, it works well and it takes 3 minutes :
...
1
vote
1
answer
2k
views
I made a Python program to calculate price based on Inflation Rate
I made a program that calculates how much the value of money has decreased due to inflation over a given set of years.
This takes a principal amount, a start and end date, and with the help of the ...
4
votes
1
answer
2k
views
Reading multiple csv files in a single dataframe
I have a lot of compressed csv files in a directory. I want to read all those files in a single dataframe. This is what I have done till now:
...
2
votes
1
answer
59
views
Batch retrieve formatted address along with geometry (lat/long) and output to csv
I have a csv file with 3 fields, two of which are of my interest, Merchant_Name and City.
My goal was to output multiple csv ...
5
votes
1
answer
103
views
Combining CSV files of simulation results
This script is a subset of a larger script where I have the output of many test simulations in the form of CSVs. Each file starts with the model name and includes the number of elements in my file. ...
2
votes
1
answer
93
views
Grouping sales transactions by person
I have a csv file with sales transactions. Each transaction includes person identifiers (which are sometimes/often missing) and transaction data. Person identifiers are fname, lname, phone, email and ...
4
votes
1
answer
87
views
Count words in a list of titles, with some cleanup
I have a list of article titles, where I wish to count the number of occurrences for each word (and remove some words and characters). The input is in a .csv file where the titles are in column '...