All Questions
34 questions
4
votes
4
answers
1k
views
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 ...
2
votes
1
answer
77
views
Extending die roll simulations for complex data science tasks
I've developed a Python script that simulates die rolls and analyses the results. I'm now looking to extend and modify this code for more complex data science tasks and simulations.
Is this code ...
2
votes
1
answer
171
views
Flag tukey outliers using python pandas groupby
I'm new to python and pandas.
I would like to use pandas groupby() to flag values in a df that are outliers. I think I've got it working, but as I'm new to python, ...
2
votes
1
answer
180
views
Efficient List comprehension with multiple conditions using shift? [closed]
I am new to python.
I am trying to get the total number of failures by checking first how did the transition of the column Failure Sensor. Then creating the Start column from devicetimestamp if the ...
2
votes
1
answer
50
views
Obtaining error code information that occurs before, during, and after a fix/repair using date data
I have completed a project I was working on using the methods I know how, but it is very inefficient. I am a beginner trying to figure out how I can improve my work by using software solutions.
I have ...
5
votes
1
answer
214
views
Simple python quiz
I'm learning python, and I'm trying to practice what I learned recently.
I wanted to make a quiz game using pandas.
What do you think? Is there anything I could do better?
...
1
vote
1
answer
797
views
Calculating the value of a stock-portfolio over time using Python Pandas
I am quite at the beginning of learning Python and decided to start my own little coding project to improve my skills.
The goal of my project is to simulate the past growth of a stock portfolio based ...
1
vote
1
answer
236
views
Scrape from Craigslist
I'm new to Python and just started to learn about scraping and pandas library. Here is a little scraper I wrote. I'd like to know what's a professional code for this would look like. I have a sense my ...
3
votes
1
answer
8k
views
Williams Fractal technical indicator implementation
I'm creating a function that gives me the Williams Fractal technical indicator, which by nature is a lagging indicator to apply at the currently analysed row of the dataframe, rather than where it ...
2
votes
1
answer
73
views
Martix of Counts of Regex Hits Over a List of Strings
I have:
A dataframe with Identifiers (TermId) and Search Terms (SearchTerm).
A list of text strings (...
8
votes
3
answers
2k
views
Priority based categorization using pandas/python
I have invoice and code data in the below Dataframes
Invoices
...
6
votes
1
answer
17k
views
Finding the most frequent words in Pandas dataframe
I am new in Python coding. I think the code could be written in a better and more compact form. It compiles quite slowly due to the method of removing stop-words.
I wanted to find the top 10 most ...
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 ...
8
votes
1
answer
139
views
Using get_dummies to create a Simple Recommender System - Cold Start
Question: was using get_dummies a good choice for converting categorical strings?
I used get_dummies to convert categorical ...