Pandas is a Python data analysis library.
0
votes
0answers
20 views
Speed up Pandas DataFrame expansion to include time-lagged information about events
Using pandas and Python 3, information about a simple timeseries data set is being processed. Within the span of .5 seconds, 3 names are being said. We record the onset of each utterance, the length ...
5
votes
1answer
66 views
Monte Carlo estimation of the Hypergeometric Function
I am trying to implement the algorithm described in the paper Statistical Test for the Comparison of Samples from Mutational Spectra (Adams & Skopek, 1986) DOI: 10.1016/0022-2836(87)90669-3:
$$p ...
0
votes
0answers
45 views
Speeding up filtering function in Pandas
I have a CSV file with 400 000 rows and the following headers:
...
1
vote
0answers
25 views
Speed up projection of a bipartitie network for a big file using NetworkX and Pandas
I have a pretty big file (3 million lines) with each line being a person-to-event relationship. Ultimate, I want to project this bipartite network onto a single-mode, weighted, network, and write it ...
10
votes
1answer
173 views
Simplifying Python Pandas code for selecting co-occurrences in a window of time
I am a beginner at programming. I was able to build the thing below, which achieves what I want with a small dataset. With larger datasets, my RAM gets swamped bringing the computer to a halt (2014 ...
1
vote
1answer
270 views
Parse Bloomberg Excel/CSV with Pandas DataFrame
I retrieved Bloomberg data using the Excel API. In the typical fashion, the first row contains tickers in every fourth column, and the second row has the labels Date, PX_LAST, [Empty Column], Date, ...
3
votes
1answer
1k views
More efficient way to work with pandas dataframes for stock backtesting exercise?
I'm attempting to apply a long set of conditions and operations onto a pandas dataframe (see the dataframe below with VTI, upper, lower, etc). I attempted to use apply, but I was having a lot of ...
1
vote
0answers
52 views
Generate features for future ML analysis of asset returns
I have built the following code to download stock data from Yahoo Finance. The plan is to then use the built-in pandas functions to calculate metrics from this data ...