How to hide the spin in QDateEdit

Python
I tried hide the spin in my QDateEdit but I cant, how can I hide him? I'm Reading the documentation but cant find how to. thx2all. ...
10 months ago

call function from other file with if __name__ == "__main__":

Python
I am trying to call function "searchF" in other file with redefined variable "search", but I am assume it doesn't work because function calls main thr...
10 months ago

Entering a floating point number, not reaching the error message

Python
I am trying to write a program for this assignment: Write a program to prompt for a score between 0.0 and 1.0. If the score is out of range, print...
10 months ago

Python inherit variables from parent class

Python
Sorry if I don't explain it that well but I'll try my best: So I want to inherit the variables from the Parent class, but I don't want to pass them a...
10 months ago

Can i make one checkbutton in tkinter check all the other checkbuttons?

Python
Is there any way i can have one checkbutton in tkinter which if checked, will check every other checkbutton aswell? Example: Checkbutton(root, text...
10 months ago

Automatically delete first <?php> tag from php files using python

Python
How to delete the first &lt;?php&gt; tag from all .php files, for example: &lt;?php $kfefji = jnd637!$%*Uyei85778*(&amp;hdhd) ?&gt;&lt;?php&gt; not t...
10 months ago

What is the most efficient way to perform math on a set of selected rows in a Dataframe

Python
I have a Pandas Dataframe of the following format: Location| X | Y ---------------- A1 | 1 | 2 A1 | 2 | 3 A2 | 1 | 1 A2 | 2 | 3 e...
10 months ago

How to add unprocessed strings to a DataFrame in python?

Python
I have a string object that is looking like this: Numărul de camere 3 camere Suprafaţa totală 77 m² Suprafaţa bucătăriei 11 m² Tipul clădirii Dat în ...
10 months ago

regular epression python find pattern within string

Python
one question regarding repeating pattern I have: import re a = ['123', '121', '136'] pattern_variable = '[1-9][1-9][1-9]' for i in a: match = ...
10 months ago

Running an operation on one column based on content from another column in Pandas Dataframe

Python
I'm trying to convert the negative value of rows in column 'nominal' where the corresponding value in column 'side' is equal to 'B'. I don't want to l...
10 months ago

declare a variable as *not* an integer in sage/maxima solve

Python
I am trying to solve symbolically a simple equation for x: solve(x^K + d == R, x) I am declaring these variables and assumptions: var('K, d, R') a...
10 months ago

Why do subnodes act like static attribute?

Python
I tried to implement a tree data structure in Python. This is what I've ended up so far: class Node: """ This class implements a node in a tr...
10 months ago

Finding a Word in a File

Python
I'm trying to read from a file 'input.txt', one line at a time, numbering each line. I then need to check each line to see whether the letters in the ...
10 months ago

Python - One line if-elif-else statement

Python
I'm trying to condense an if-elif-else statement into one line. I tried: a == 1 ? print "one" : a == 2 ? print "two" : print "none" But I got a syn...
10 months ago

Numpy matrix product - sparse matrices

Python
Let us consider a matrix A as a diagonal matrix and a matrix B a random matrix, both with size N x N. We want to use the sparse properties of the matr...
10 months ago

How to simulate from an (arbitrary) continuous probability distribution?

Python
I have a probability density function like this: def p1(x): return ( sin(x) ** (-0.75) ) / (4.32141 * (x ** (1/5))) I want to denerate random v...
10 months ago

Python script not executed from Cron

Python
I am trying to run a Python script from Cron but it does not work. I have already tried everything I have seen in multiple Stackoverflow questions.The...
10 months ago

Get selected feature names TFIDF Vectorizer

Python
I'm using python and I want to get the TFIDF representation for a large corpus of data, I'm using the following code to convert the docs into their TF...
10 months ago

Using map() for columns in a pandas dataframe

Python
I have some columns in my dataframe for which I just want to keep the date part and remove the time part. I have made a list of these columns: list_o...
10 months ago

Pythonic way of reading text file using Swift

Python
I know Python and I'm trying to learn Swift... I am trying to figure out how to just read a plain text file from an absolute file path In Python, ...
10 months ago