python3 tag

685 questions


1 answers
435 views
0
To enter a string from Python to Excel (xlwings) containing the 記号 symbol

I am thinking of using Python instead of Excel VBA.What should I do with the escape sequence (マーク mark) when I try to write a string stored in a variable on the python source that means a folder path ...

1 years ago

1 answers
317 views
0
Understanding the Processing of Variables Defined by If in a Function

Python is having trouble handling variables defined in if in the function.We are creating the following programs:目的:Rename the png file in the same hierarchy folder or one lower hierarchy folderUse th...

1 years ago

1 answers
426 views
0
I want Python to convert all 3D lists to tuple

I would like to convert the 3D list into a tuple as shown below, but what should I do?obj1=[[[1,2],[3,4]],[[5,6],[7,8]]]obj2=(((1,2),(3,4)),((5,6),(7,8))))Thank you for your cooperation.

1 years ago

1 answers
433 views
0
I want to delete a combination of arrays specified in Python's three-dimensional array.

I would like to delete [[23][01][01]] which is the opposite combination of [[01][23]] in Python's three-dimensional ndarray array as shown below.import numpy as nparr1 = np.array([[0,1], [2,3]], [[...

1 years ago

1 answers
447 views
0
I want an event to happen when I click on a particular image on tkinter.

How do I make an event happen when I click on an image?(Viewing images on tkinter.) a=tkinter.PhotoImage(file=○○.png)  canvas.create_image(x,y,image=a)I would like to click on this image to generate a...

1 years ago

1 answers
317 views
0
I want to write an import statement in one line.

to distinguish Python's Pillow packages from other packages, as follows:I'd like to use it with the prefix pil, but after trying various things, I couldn't achieve it without two lines of import state...

1 years ago

1 answers
283 views
0
Determine if the values in each column are included in the text

How do I determine if the values in each column are included in the text?import pandas as pddf = pd.DataFrame( data = { 'Context': ['Clear in Tokyo', 'Cloudy Kanagawa', 'Hot Okinawa Climate', Keywor...

1 years ago

3 answers
465 views
0
I want python to expose the histogram data in the txt file to quantitative data and store it in an array.

I'm trying to create a program in Python 3 using the Jupiter Notebook.What you want to do is to read the histogram data in the txt file into an array that is dispersed into the original quantitative d...

1 years ago

1 answers
415 views
0
Error importing dtreeviz

I would like to import dtreeviz with the following code. from dtreeviz.trees import dtreevizWhen you try, you get the following error:cannot import name 'dtreeviz' from 'dtreeviz.trees'Graphviz is ins...

1 years ago

1 answers
456 views
0
Error in drawing decision tree

Execute the following code to draw the decision tree.#index extractionx_0 = df_info.resample('M') .count()x_0=x_0.drop(x_0.columns.values,axis=1)time_index=x_0.indexprint(time_index)# Draw decision tr...

1 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.