upgraded numpy and now I am overwhelmed by RuntimeWarning
Just upgraded numpy to the latest intel conda’s, I am at pandas 2.2.1, numpy 1.24.3 and numexpr 2.10.0
upgraded numpy and now I am overwhelmed by run-time errors
Just upgraded numpy to the latest intel conda’s, I am at pandas 2.2.1, numpy 1.24.3 and numexpr 2.10.0
Python np.char.add changes datatype / weird behavior
Can somebody explain the following behavior?
Pandas fillna(‘value’) followed by df.replace(‘value’,np.nan) not working
For some reason df.replace() is not working for me. I want to fill nan values with a dummy value, pivot, then turn the dummy values back into nans using replace, but replace is not working. On further investigation it seems that the ‘yy’ value is not being recognised as the same as the fillna value so the function cant find anything to replace. e.g.
TypeError: Cannot convert numpy.ndarray to numpy.ndarray
I’m not sure why but after getting a new install of windows and a new pycharm install and trying to run some previously functional code I am now getting the above error with the code below. Is it a setup issue or has something changed that now makes this code not function? Error happens on the last line. The error doesn’t make sense to me as there should be no conversion required for ndarray to ndarray.
How does pandas isna treat pd.NA?
I have the following dataframe
How can I store binary numbers in pandas?
I’m dealing with a large data set and I have a column that is treat as an object
Resampling DataFrame with MultiIndex in Pandas for Specific Time Intervals
I have a DataFrame in Pandas with a MultiIndex consisting of two levels (‘market_id’ and ‘runner_id’). The DataFrame contains a column called ‘running’ representing time durations. I want to resample this DataFrame so that it shows intervals of 1 minute starting at 0 days 00:00:00 up until 120 minutes for each combination of ‘market_id’ and ‘runner_id’. I need to interpolate the ‘last_traded_price’ at each minute.
To locate the indices of DataFrame entries containing specific strings
How do I find the indices of DataFrame entries containing specific strings and these strings are not column names.
Best way to split jagged array on first element and fill with other elements
It’s hard to describe this problem, but the code below should clarify.
Basically i start with an array where first element is another array of N size.
the rest of the array is a single element. I want to split the first element a for every partion, fill with the remainder of the array: