Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: [Numpy] How to store different data type in one numpy array?
Post: RE: [Numpy] How to store different data type in on...

Different data type seems just can be store into tuple then as array element in one array, can't store as standalone array element directly in one array.
water Data Science 7 614 Mar-25-2024, 09:12 AM
    Thread: [Numpy] How to store different data type in one numpy array?
Post: [Numpy] How to store different data type in one nu...

I want to store different data type in on numpy array, b = np.array([['2024-03-22', 71.0, 'ceh'], ['2024-03-23', 63.0, 'abc']])and specific dtype likes: [['datetime64[D]', 'float64', 'string'], ['dat...
water Data Science 7 614 Mar-23-2024, 08:55 PM
    Thread: [Numpy] Load date/time from .txt to 'datetime64' type.
Post: RE: [Numpy] Load date/time from .txt to 'datetime6...

(Mar-01-2024, 09:30 AM)Gribouillis Wrote: def gen(file): for line in file: t = dt.datetime.strptime(line, "%Y-%m-%d, %H:%M:%S\n") yield t.isoformat() That seems a good method for...
water Data Science 4 624 Mar-01-2024, 07:25 PM
    Thread: [Numpy] Load date/time from .txt to 'datetime64' type.
Post: [Numpy] Load date/time from .txt to 'datetime64' t...

I have date/time data in .txt file likes below format: 2024-2-27, 0:0:0 2024-2-27, 3:7:2 2024-2-27, 4:11:3 2024-2-27, 6:3:5 2024-2-27, 13:10:6 2024-2-27, 20:20:7 2024-2-27, 21:30:9 2024-2-27, 22:40:10...
water Data Science 4 624 Mar-01-2024, 08:54 AM
    Thread: Treeview heading event detect.
Post: Treeview heading event detect.

I try to detect which column of Treeview heading clicked, like below: from tkinter import Tk, ttk def click_test(event): region = tree_1.identify('region', event.x, event.y) if region == 'heading'...
water GUI 1 2,244 Apr-10-2022, 07:44 PM
    Thread: About list copy.
Post: About list copy.

I try to create a copy of list via two ways: a = [[1,2, 3], [4, 5, 6], [7, 8, 9]] b = a.copy() b[0].pop(2) b[1].pop(2) b[2].pop(2)a = [[1,2, 3], [4, 5, 6], [7, 8, 9]] b = [] for i in a: b.append(...
water General Coding Help 3 1,554 Apr-02-2022, 08:45 PM
    Thread: Change Treeview column color?
Post: RE: Change Treeview column color?

Have some other ways to change whole column style simply?
water GUI 3 9,656 Mar-04-2022, 09:49 AM
  Question Thread: Change Treeview column color?
Post: Change Treeview column color?

In tkinter Treeview, use tags just could be change something by row, can I change something by column? from tkinter import Tk, ttk root_ = Tk() tree_1 = ttk.Treeview(root_, height = 15, columns = ('...
water GUI 3 9,656 Mar-03-2022, 06:40 PM
    Thread: kivy SyntaxError.
Post: kivy SyntaxError.

I follow a tutorial test kivy like below: from kivy.app import App # importing builder from kivy from kivy.lang import Builder # this is the main class which will # render the whole application cl...
water GUI 1 1,613 Feb-26-2022, 08:02 PM
    Thread: About Tkinter Treeview.selection_get() usage.
Post: RE: About Tkinter Treeview.selection_get() usage.

Thanks for reply.
water GUI 3 8,342 Feb-12-2022, 02:19 PM
    Thread: About Tkinter Treeview.selection_get() usage.
Post: About Tkinter Treeview.selection_get() usage.

Tkinter Treeview widget has selection_get, but document not introduce about that, how to use it? from tkinter import Tk, ttk root_ = Tk() tree1 = ttk.Treeview(root_, height = 10, selectmode = 'browse...
water GUI 3 8,342 Feb-11-2022, 07:03 PM
  Question Thread: about Numpy indexing.
Post: about Numpy indexing.

a = np.arange(25).reshape(5, 5) aOutput:array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19], [20, 21, 22, 23, 24]])np.diag(a, ...
water Data Science 1 1,468 Jan-18-2022, 07:54 PM
    Thread: Get a range from GUI ?
Post: RE: Get a range from GUI ?

Quote:If that's the case, you must be using some graphics package, Which one?? for instance tkinter, Qt5, Kivy, wxpython or something else. I use two tkinter Scale to get value each, but not enough c...
water GUI 7 2,762 Jan-20-2021, 05:48 PM
    Thread: Get a range from GUI ?
Post: RE: Get a range from GUI ?

(Jan-19-2021, 07:49 PM)Larz60+ Wrote: which GUI package are you using? It's the question, the image only captue from other software, widget not implement currently.
water GUI 7 2,762 Jan-19-2021, 10:22 PM
  Smile Thread: Get a range from GUI ?
Post: RE: Get a range from GUI ?

Yes, I already do that use two 'Scale' widget. But if make two markers on same axis will more intuition than Spinbox, although it's image of idea. **smile** Capture from Audio editor: [Image: https:...
water GUI 7 2,762 Jan-19-2021, 09:25 PM
  Question Thread: Get a range from GUI ?
Post: Get a range from GUI ?

I want to make a widget like this: [Image: https://i.ibb.co/h7C8Q6K/111.jpg] Get a range from GUI via mouse(e.g. return (1, 3) or (16, 23)...), I try to use ttk.Scale(), but it can't set two sliders,...
water GUI 7 2,762 Jan-19-2021, 05:55 PM
    Thread: How to configure scrollbar dimension?
Post: RE: How to configure scrollbar dimension?

Got it, use 'sticky' stretch the 'scrollbar'. **wink**
water GUI 6 3,461 Jan-03-2021, 06:03 PM
    Thread: Can I configure 'tab' widgets state to 'disabled'?
Post: RE: Can I configure 'tab' widgets state to 'disabl...

(Jan-02-2021, 07:21 PM)deanhystad Wrote: Try searching before posting. search: disable tkinter notebook tab first hit: https://stackoverflow.com/questions/2098...python-gui Followed by several ot...
water GUI 2 3,576 Jan-02-2021, 08:29 PM
    Thread: How to configure scrollbar dimension?
Post: RE: How to configure scrollbar dimension?

from tkinter import Tk, Listbox, Scrollbar root_window = Tk() list_1 = Listbox(root_window, height = 5) list_1.grid(row = 0, column = 0) vsb = Scrollbar(root_window, orient = 'vertical', command = ...
water GUI 6 3,461 Jan-02-2021, 08:26 PM
  Question Thread: Can I configure 'tab' widgets state to 'disabled'?
Post: Can I configure 'tab' widgets state to 'disabled'?

notebooks = ttk.Notebook(root) tab_1 = ttk.rame(notebooks) notebooks.add(tab_1, text = 'tab-1')Can I configure the 'tab_1' un-selectable like Text(or other) widgets state = tk.DISABLED ?
water GUI 2 3,576 Jan-02-2021, 07:09 PM

User Panel Messages

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