15,190 Topics
![]() | |
I have two dataframes and I need to separate rows where a value from pmdf matches one of the codes in jcrdf.All_codes. If pmdf.code is in jcrdf.All_codes, I need a dataframe with all values from jcrdf AND pmdf.count. Dataframes: pmdf = pd.DataFrame( { 'code': ['0567-8315','0007-4977','0096-0225','1365-2133','8675-309J'], 'count':['6','7','10','2','1'] } ) jcrdf = … | |
Hello, everybody. I was wondering if anybody could help me with something. I don't know if I'm taking things too fast but, I was wondering if somebody could help with this program I am making. I'm currently writing a "fake" bank script. Basically you start with a set amount of … | |
hey mr /ms i need that we could discuss a new idea how can we improve python and make it more easy to install modules and other staff | |
hello freinds i have put an image (self.image) on my window background now, i need to put another image(mi_but1) on this window.. my problem: image mi_but1 is put on window with a gray square behind it(a gray square between image mi_but1 and window's background) .the final gui doesnt look nice.i … | |
I need some help why can't I create an instance of the child class without an error ? class tv(): def _init__(self,color,screen,frame): self.color=color self.screen = screen self.frame = frame def DesOfTV(self): info = "The TV has a"+self.color+"and a"+self.screen+"screen" return info class retroTV(tv): def __init__(self,color,screen,frame): super().__init__(color,screen,frame) oldertV = retroTV("black","tuber","wood") | |
Hello. I have a project to develop a tool that reads Windows 7 raw memory dump. My lecturer says that he'd rather we use python or c coz that's his specialy but we can choose whatever. We chose python (bcoz i feel like its an opportunity to further learn about … | |
I want to draw a checkerboard on Python, but I only get one black square. Can you help me fix this program? import turtle def filled_square(size, color, x, y): turtle.setpos(x, y) turtle.color(color) turtle.begin_fill() for i in range(4): angle = 90 turtle.fd(size) turtle.lt(angle) turtle.end_fill() turtle.up() import sys n = int(sys.argv[1]) s … | |
Hello! Can you give me an example of Button widget in Kivy language? I can creat the button but don't know how to use it's callback. I mean how can i set a command for the Button in Kivy? | |
long waitingTime(vector<int> tickets, int p) { // bool flag indicates whether it's Jesse or not queue<pair<int, bool> > aQueue; for(int i = 0; i < tickets.size(); i++) { aQueue.push(make_pair(tickets[i], i == p)); } long long nTime = 1; while(!aQueue.empty()) { pair<int, bool> aItem = aQueue.front(); aQueue.pop(); nTime++; if(aItem.first == 1 … | |
Is it possible to integrate Perfect Circles of the Golden ratio geometry in designing logo based on these link ( https://goo.gl/images/7eYZoG ) to recognize flower.. What do you think guys? Im planning to have a research on this. | |
I want to print the count N letters of string but it result in error can anybody help me? import subprocess variable = "making" s = subprocess.Popen(("grep","-o -w","%s"%variable, "output.txt|wc -w"), stdout = subprocess.PIPE) output = s.communicate()[0] print(output) | |
so I'm working on a class for a vector which I want to hash like a tuple, and to do so, a vector instance needs acess to it's properties. here's the constructor for the performative properties I'm using, and the vector class: def newProp(): newdict = {} getter = newdict.get … | |
I have a text file containing the following data. ascon1 201707011 John 77.5 11.5 11.5 11.5 ascon1 201707012 Grld 70.0 11.5 11.5 11.5 ascon1 201707013 Josh 79.5 11.5 11.5 11.5 ascon1 201707014 Jess 67.5 11.5 11.5 11.5 ascon1 201707015 Jack 97.5 11.5 11.5 11.5 I need the data to look … | |
# Am looking for best practises of displaying document info in tkinter messagebox from tkinter import * from tkinter import messagebox def profile(): messagebox.showinfo("info","college\tNew student\tGraduating students\noak institue\t202\t210\nPine college\t143\t121") root =Tk() root.geometry("200x200") C = Button(text="copyright",command=profile).pack() root.mainloop() #I think if am going to type all the info in the document the arrangement … | |
Hello. I am making a program that interacts with MySQL database/table. I ran into 2 problems. The first one is about saving data which user entered into cell/or edited existing data in cell. The second problem is about inserting new row. Row is inserted, but it still shows error in … | |
I want to display the content of selected treeview only in tkinter but when i select the treeview other treeview content also display but i want only the selected treeview to display. I have working around to get this by the use of style widget but it display other content … | |
I am searching for the logical Python logical operator "or"; While C++ is: 1 || 4 (using pipes) I assume Python would simply be "or", as in: 1 or 4 Or something like this: if var1 == "image0.GIF" or "image1.GIF" or "image2.GIF": varValue = 10 Is this syntax for Python … | |
I can make a plot in python its no problem. My question is : Dose there any option to make more than one plot over each other but not in the same time?!(plot the first one wait a bit then plot the second one over the first one and so … | |
I have an automated API with a secure frontend/backend structure where backend object attributes are hidden with frontend proxy classes. basically, when accessing an object from the frontend, you get a proxy object disguised as the backend object with all it's explicitly "public" functionality. what I'm dealing with right now … | |
The quadruplex sequence of a genome looks like this Gx Ny1 Gx Ny2 Gx Ny3 Gx, where G is the Guanine base and the Ns are representing other bases. The x, y1, y2 and y3 are integer. A particular segment will be quadruplex sequence if x>=2. My question is I … | |
Hi all, I am working on program that will connect to MySQL database, colect data from table and show them in grid. Where user can edit cell, and then on enter key changes will bi save directly into database table. Curent problem is that I am stuck at importing data … | |
hello friends... i want to print a persian file by thermal printer.. i can print an english file esily..but i face the proble while printing persian text.. i think i don't do some principles...i have studied about unicode encodeand decode in python..but it seems it isn't enough please guide me … | |
This class gives a specified Tkinter widget a tooltip that appears as the mouse is above the widget. You can improve the code by putting in a time delay. | |
Hello, so i tried to make my own insta crawler but having some dificulties, here is the code for now: import requests from bs4 import BeautifulSoup def insta_spider(max_pages): page = 1 while page <= max_pages: url = 'https://instagram.com/xenia/' source_code = requests.get(url) plain_text = source_code.text soup = BeautifulSoup(plain_text, "html.parser") … | |
A positive integer n is said to be perfect if the sum of the factors of n, other than n itself, add up to n. For instance 6 is perfect since the factors of 6 are {1,2,3,6} and 1+2+3=6. Likewise, 28 is perfect because the factors of 28 are {1,2,4,7,14,28} … | |
I'm working on a project in Python that I'm having trouble with. I've asked so many people but they seem to not be able to help me :/ I'm coding a little program that executes system commands. The idea is that one machine opens the server and the other one … | |
Hey guys, I got a little bored and thought I would to make some of the basic Client/Server applications I have a little bit flashier with a gui interface. So far I have just been working with the server and the main problem that I run into is when the … | |
Hello, I was testing a class in a GUI, and that error message showed up. Please help. Code: [CODE]from Tkinter import * class Application(Frame): def __init__(self, master): super(Application, self).__init__(master) self.grid self.create_widgets() def create_widgest(self): self.bttn1 = Button(self, text = "I do nothing!") self.bttn1.grid() self.bttn2 = Button(self, text = "Me too.") self.bttn2.grid() … | |
I need to read a list of names from different files using python and produce the list of names that appear the first time from each file. Help!! | |
I've downloaded the file "qt-unified-windows-x86-3.0.0-online.exe" and installed Qt and I've also downloaded and unpacked the file "PyQt5_gpl-5.9.zip". I'm using Python 3.6 but I can't figure out where to drop the extracted PyQt5 files. I can't find a Python directory anywhere on my C: drive except for under my home directory. … |
The End.