Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: using function in np.where
Post: RE: using function in np.where
But I would then be passing an array to the function and the function would have to work on the entire array and return a modified array -> np.where would then have to handle that this gets passed ... |
|
glidecode |
General Coding Help |
6 |
1,728 |
Feb-18-2022, 08:19 AM |
|
|
Thread: using function in np.where
Post: RE: using function in np.where
Each row in my dataframe is for a certain date and I'm looking to only call the function on dates where it's relevant, to save computation power.
So I need to pass the date (different for each row) a... |
|
glidecode |
General Coding Help |
6 |
1,728 |
Feb-17-2022, 07:14 PM |
|
|
Thread: using function in np.where
Post: using function in np.where
I'm using np.where and trying to reference a function call instead of putting in a static value, something like:
np.where(condition,function(arg1,arg2),0) | so if conditions returns true: call functio... |
|
glidecode |
General Coding Help |
6 |
1,728 |
Feb-17-2022, 06:48 PM |
|
|
Thread: Filter dataframe by datetime.date column
Post: RE: Filter dataframe by datetime.date column
Thanks for the input!
I have a further problem
I have a separate dataframe where the "date" column is in the format: <class 'pandas._libs.tslibs.timestamps.Timestamp'>
I want to filter the da... |
|
glidecode |
General Coding Help |
2 |
5,334 |
Dec-05-2021, 12:51 AM |
|
|
Thread: Filter dataframe by datetime.date column
Post: Filter dataframe by datetime.date column
I usually filter for data like this: df[df.somecolumn > 10]
However, I haven't been able to do this for a column I have in type "datetime.date"
If I do: df[df["date"] == "2020-11-30"]) I get noth... |
|
glidecode |
General Coding Help |
2 |
5,334 |
Dec-04-2021, 05:11 PM |
|
|
Thread: List of dataframe values beginning with x,y or z
Post: RE: List of dataframe values beginning with x,y or...
I figured out the problem!
It is described here: https://cumsum.wordpress.com/2021/05/05/...type-bool/
Simply, the expression is interpreted with priority to the "|" - so in my example, it will look... |
|
glidecode |
General Coding Help |
3 |
1,991 |
Nov-08-2021, 10:16 PM |
|
|
Thread: List of dataframe values beginning with x,y or z
Post: RE: List of dataframe values beginning with x,y or...
It then gives me this error (which I have run into many times today):
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all(). |
|
glidecode |
General Coding Help |
3 |
1,991 |
Nov-08-2021, 08:52 PM |
|
|
Thread: List of dataframe values beginning with x,y or z
Post: List of dataframe values beginning with x,y or z
I have found a way to return all rows of a specified column in a data frame beginning with letter x.
The following will return a new dataframe reduced to the specified column and for row where the exp... |
|
glidecode |
General Coding Help |
3 |
1,991 |
Nov-08-2021, 08:30 PM |
|
|
Thread: Basic storage of function values for monte carlo simulation
Post: Basic storage of function values for monte carlo s...
I'm testing out some simple monte carlo simulations which I'd like to plot on a graph.
Here is an idea about how to do this:
1) Create an empty dataframe to store values
2) Run loop and for each ru... |
|
glidecode |
Data Science |
1 |
1,798 |
Apr-14-2020, 09:19 PM |
|
|
Thread: Curiosity about lower levels in programming
Post: RE: Curiosity about lower levels in programming
I have started reading in this book written by the guys behind Nand2Tetris (It has very solid reviews!):
https://www.amazon.com/Elements-Computin...ef=ed_oe_p |
|
glidecode |
News and Discussions |
10 |
4,902 |
Sep-08-2018, 09:02 PM |
|
|
Thread: Curiosity about lower levels in programming
Post: RE: Curiosity about lower levels in programming
Thanks for your input Larz, very interesting. I will look into some of that.
I have heard good things about Nand2Tetris before and looked at their site. Definitely something to consider looking into... |
|
glidecode |
News and Discussions |
10 |
4,902 |
Sep-07-2018, 11:00 AM |
|
|
Thread: Curiosity about lower levels in programming
Post: RE: Curiosity about lower levels in programming
Interesting answer Griboullis. I have watched a few good videos explaining some of the very basics and while interesting it can be tedious. Maybe the boredom of some of the small details will cancel o... |
|
glidecode |
News and Discussions |
10 |
4,902 |
Sep-06-2018, 09:21 AM |
|
|
Thread: Curiosity about lower levels in programming
Post: RE: Curiosity about lower levels in programming
Could we move the thread to another location on the forum? |
|
glidecode |
News and Discussions |
10 |
4,902 |
Sep-05-2018, 11:15 PM |
|
|
Thread: Curiosity about lower levels in programming
Post: Curiosity about lower levels in programming
Hi everyone
Ever since I started learning and doing some programming I have had an extreme curiosity about the lower levels of programming. While programming or reading about programming in python (o... |
|
glidecode |
News and Discussions |
10 |
4,902 |
Sep-05-2018, 10:36 PM |
|
|
Thread: Developing as a programmer by coding actual work
Post: Developing as a programmer by coding actual work
Hi all
I have been looking into python for a while and made some small scripts for my own use. This can be a fine way to learn and improve - any coding > just reading. However I have started thin... |
|
glidecode |
News and Discussions |
0 |
2,047 |
May-06-2018, 01:12 PM |
|
|
Thread: x.sum() VS sum(x) - Calling a function
Post: RE: x.sum() VS sum(x) - Calling a function
I had copied the same text twice. I have changed it now. The title of the thread points to the difference. |
|
glidecode |
General Coding Help |
2 |
2,927 |
Mar-27-2018, 06:27 PM |
|
|
Thread: x.sum() VS sum(x) - Calling a function
Post: x.sum() VS sum(x) - Calling a function
I think there's something rather fundamental I have missed regarding calling functions.
I need to fill a column in one dataframe with the sum of the columns in another dataframe.
First I did somethi... |
|
glidecode |
General Coding Help |
2 |
2,927 |
Mar-27-2018, 04:13 PM |
|
|
Thread: pandas DataReader error on all data sources
Post: RE: pandas DataReader error on all data sources
Thanks a lot! I hadn't thought about checking my version of pandas-datareader and sure enough it was 0.2 or so.
Installing with pip directly didn't upgrade it for me. Though uninstalling and reinsta... |
|
glidecode |
Data Science |
5 |
18,300 |
Mar-06-2018, 01:38 PM |
|
|
Thread: pandas DataReader error on all data sources
Post: pandas DataReader error on all data sources
I have previously used the DataReader in pandas with various data sources.
Now Google and Yahoo are more or less deprecated, however I can't get data from any source.
The error I get:
NotImplement... |
|
glidecode |
Data Science |
5 |
18,300 |
Mar-06-2018, 01:01 AM |
|
|
Thread: urllib urlopen getting error 400 on 1 specific page
Post: RE: urllib urlopen getting error 400 on 1 specific...
Thanks to both of you.
And yes Snipsatt they have an API, but it's expensive and I actually use this mostly to learn another part of programming. |
|
glidecode |
Web Scraping & Web Development |
4 |
4,197 |
Mar-01-2018, 11:01 PM |