Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: ModulNotFoundError matplotlib
Post: RE: ModulNotFoundError matplotlib

You can do "pip list" to see a list of packages installed using pip. There's also no harm in reinstalling. pip install matplotlib should print a lot of stuff Output:c:\projects\bergen>pip install...
deanhystad General Coding Help 9 214 Yesterday, 04:59 PM
    Thread: ModulNotFoundError matplotlib
Post: RE: ModulNotFoundError matplotlib

Quote:I went to matplotlib's website and did a bunch of things that it seemed to be telling me to do to get matplotlib That is not an answer. I don't think you installed matplotlib, at least not the ...
deanhystad General Coding Help 9 214 Yesterday, 04:36 PM
    Thread: using mutable in function defintion as optional paramter
Post: RE: using mutable in function defintion as optiona...

Maybe this makes it more clear. def incorrect(item, quantity, shopping_list={}): shopping_list[item] = shopping_list.get(item, 0) + quantity return shopping_list # Is needed else there is no ...
deanhystad General Coding Help 4 239 Yesterday, 12:52 PM
    Thread: ModulNotFoundError matplotlib
Post: RE: ModulNotFoundError matplotlib

How did you install matplotlib? Import does not install a package.
deanhystad General Coding Help 9 214 Yesterday, 01:14 AM
    Thread: New on python. Needs help with Google sheet
Post: RE: New on python. Needs help with Google sheet

I cannot find where you save your worksheet. Changing the worksheet does not modify the spreadsheet file.. There may be other problems, but start by fixing this so you can see what changes you are m...
deanhystad General Coding Help 1 146 Apr-25-2024, 06:47 PM
    Thread: how to edited Tkinter Toplevel from main form?
Post: RE: how to edited Tkinter Toplevel from main form?

Run the program and press the buttons. The label made in BadWindow appears in the root window.
deanhystad General Coding Help 7 247 Apr-25-2024, 10:16 AM
    Thread: Win or Loss Prediction
Post: RE: Win or Loss Prediction

Can you provide an example of what you tried?
deanhystad General Coding Help 4 231 Apr-24-2024, 07:58 PM
    Thread: watchdog on_modified
Post: RE: watchdog on_modified

Quote:Also, I cannot use the path 'E:/DataLogging/test.xlsx' but I can use 'E:/DataLogging/', which is the directory, and not the specific file. I'm sure there is an easy fix for this, but I cannot fi...
deanhystad General Coding Help 3 223 Apr-24-2024, 06:23 PM
    Thread: how to edited Tkinter Toplevel from main form?
Post: RE: how to edited Tkinter Toplevel from main form?

It doesn't matter if you call Toplevel(), Toplevel(None) or Toplevel(root). The default value for "master" is None. When master is none, the root window is assigned to be the window's master. This ...
deanhystad General Coding Help 7 247 Apr-24-2024, 05:49 PM
    Thread: watchdog on_modified
Post: RE: watchdog on_modified

Watchdog is not going to work with an online document. Online documents don't have a file system, so there is nothing to observe. If this is a google sheet, or something similar, there is usually a ...
deanhystad General Coding Help 3 223 Apr-23-2024, 03:09 PM
    Thread: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries
Post: RE: FutureWarning: The behavior of DataFrame conca...

Quote: that's a good point using concat instead That not what I was trying to say. concat is better than append, but both should be used sparingly. What I was trying to say is that I would use boole...
deanhystad General Coding Help 14 453 Apr-22-2024, 09:51 PM
    Thread: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries
Post: RE: FutureWarning: The behavior of DataFrame conca...

I'm not giving up on a vectored solution quite yet, but a solution that is better than using concat is to use your logic to compute a "late_prints" column. You still pay a looping time penalty, but y...
deanhystad General Coding Help 14 453 Apr-22-2024, 05:58 PM
    Thread: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries
Post: RE: FutureWarning: The behavior of DataFrame conca...

I know I am supposed to look at the price column, but I don't see why those are "late prints". They are not passing the "one of those things is not like the other" test for me. Is there some max del...
deanhystad General Coding Help 14 453 Apr-22-2024, 02:48 PM
    Thread: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries
Post: RE: FutureWarning: The behavior of DataFrame conca...

I honestly have no idea why the circled entries are circled.
deanhystad General Coding Help 14 453 Apr-22-2024, 02:06 PM
    Thread: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries
Post: RE: FutureWarning: The behavior of DataFrame conca...

Quote: simply impossible to get rid of with boolean indexing Oh really? Edge conditions can often be detected by shifting the column and comparing the shifted and unshifted columns.
deanhystad General Coding Help 14 453 Apr-22-2024, 01:22 PM
    Thread: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries
Post: RE: FutureWarning: The behavior of DataFrame conca...

If speed is important, don’t loop and really don’t build data frames a row at a time. This code is what I expect to see when someone has a speed complaint
deanhystad General Coding Help 14 453 Apr-22-2024, 03:18 AM
    Thread: Using Lists as Dictionary Values
Post: RE: Using Lists as Dictionary Values

(Apr-20-2024, 09:55 PM)bfallert Wrote: The last part of the code assigns the list to a unique key in the dictionary. I was hoping to end up with a large dictionary of unique keys and a different lis...
deanhystad General Coding Help 8 349 Apr-20-2024, 11:44 PM
    Thread: Pandas Outer merge
Post: RE: Pandas Outer merge

Your desired output appears arbitrary. I cannot think of any logic which would produce your output, let alone find a pandas function to implement that logic. Why is (1, A, A) good but (1, A, B) bad?...
deanhystad General Coding Help 2 192 Apr-20-2024, 06:28 PM
    Thread: Using Lists as Dictionary Values
Post: RE: Using Lists as Dictionary Values

Don't reuse temp_list. Instead of clearing the list and appending the string, create a new list like this: temp_list = [','.join([str(rd_age), str(rd_yr), str(rd_yr_left), str(rd_wt), str(rd_wt_left)...
deanhystad General Coding Help 8 349 Apr-20-2024, 03:46 PM
    Thread: Using Lists as Dictionary Values
Post: RE: Using Lists as Dictionary Values

Sounds like you are reusing the list object instead of creating a new list. This creates a dictionary with multiple entries, but only one value. a = [1, 2, 3, 4] b = {'A': a, 'B': a, 'C': a} b['C'].a...
deanhystad General Coding Help 8 349 Apr-19-2024, 11:23 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020