? How to capitalize a string in python

In python 3.4 how would I convert a string to all capitalsfor example -string to STRINGi have tried .upper and it returns"string".upper<built-in method upper of str object at 0x0283E860>and i ha
 ? Issue with multidimensional list python

python 3.3.5. faced strange issue while working with List. In line 6th and 8th I am printing same variable but not sure why it is getting converted into uppercasesiblingList = [['Abc', 'Xyz', 'Def'],[
 ? Program returning undefined variable (python)

trying to get the following code to work, it still returns that the variable is undefined when the user enters an integer to try and assign a gender. How would you fix this?#define the function for th
 ? Issue installing shapely Python Package

I am running python 3.6 on windows and am attempting to install Shapely usingpip install shapely==1.6b2It is giving me the following errorsCommand "python setup.py egg_info" failed with error code 1 i
 ? How to add Logical constraints in PuLP

I am trying to solve FLP using PuLP. I want to add logical constraint for variable value.I have LpVariable f and C is list of LpVariables . I want to add f to the constraint of problem and which depen
 ? Python 3 tkinter treeview get NAME of selected item

So basically I have this tree:And I want to have the name of the item selected back by pressing the "aggiungi" button.For example when I select Pomodori and then press the button I want "Pomodori" bac
 ? Python: path between nodes in directed graph

Simple question:G is a directed graph with edgesa->ba->cc->dIt is stored in a Python dictionary G={'a':['b','c'], c:['d']}I want the path between a and d, the path between d and a, the path b
 ? Why the colorbar is not normalized (0 to 1)? How to force it?

I am plotting a confusion matrix. I have used the function from ScikitLearn. But I do not know why the colorbar does not have a range from 0 to 1. Is there a way to force it?import itertoolsdef plot_c
 ? heatmap based on ratios in Python's seaborn

I have data in Cartesian coordinates. To each Cartesian coordinate there is also binary variable. I wan to make a heatmap, where in each polygon (hexagon/rectangle,etc.) the color strength is the rati
 ? How to use feature selection and dimensionality reduction in Unsupervised learning?

I've been working on classifying emails from two authors. I've been successful in executing the same using supervised learning along with TFIDF vectorization of text, PCA and SelectPercentile feature
 ? How to get the train_scores to plot a learning curve without using the learning_curve fuction fo scikitlearn?

I have a dataset of 21 subjects with different number of samples each one.I made a curve (check the figure). I remove: [10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30,32,34,36,38,40] samples from each sub
 ? Color of the node of tree with graphviz using class_names

Expanding on a prior question:Changing colors for decision tree plot created using export graphvizHow would I color the nodes of the tree bases on the dominant class (species of iris), instead of a bi
 ? Is it OK to modify the default location for Python-3.6.0.exe to just the C drive?

I am a 65 year old "newbie" and generally use default options when downloading. Python.org wants to download to an obscure directory such as C:\Users\Facdev\AppData\Local\Programs\Python\Python36-3
 ? scrollbar doesn't expand to full screen

I need to add a scrollbar to a section of my program because they want it to show all the people instead of only one group that the other section show. In looking through SC, most of the scrollbar que
 ? How to make python 3.5.2 application exe?

I have tried so many way to make python 3.5.2 application executable (stand alone exe) but didn't work. I went with py installer and py to exe but didnt workWould you please let me know how we can ma
 ? Tkinter: make a frame have the same size as the main window

I tried looking it up but I couldn't find anything. I just want a frame, or a canvas, to have the same size as the main window, and whenever the window is expanded, the frame will also expand. I tried

Page 1 of 172  |  Show More Pages:  Top Prev Next Last