Trending questions in Python

0 votes
0 answers

Can we create a empty dataframe in python?

I want to create an empty dataframe ...READ MORE

Aug 7, 2019 in Python by Waseem
• 4,540 points
360 views
0 votes
1 answer

How do I make my own context manager?

Context is an opening file, catching expressions, ...READ MORE

Aug 6, 2019 in Python by Yamini
389 views
0 votes
1 answer

heapify returns NoneType

The heapify() method transforms the list in-place. This means ...READ MORE

Jul 26, 2019 in Python by SDeb
• 13,300 points
833 views
0 votes
1 answer

Python urllib2 Response header

Try to request as Firefox does. You ...READ MORE

Jun 28, 2019 in Python by SDeb
• 13,300 points
2,028 views
0 votes
0 answers

Can we create a python function to sort a list?

I need the logic apart from the ...READ MORE

Aug 7, 2019 in Python by Waseem
• 4,540 points
348 views
0 votes
1 answer

Round columns in pandas dataframe

You can now, use round on dataframe The code will ...READ MORE

Jul 4, 2019 in Python by SDeb
• 13,300 points
1,775 views
+1 vote
1 answer

i still can't find http proxy in system setting

Could be because you don't have the ...READ MORE

Jul 29, 2019 in Python by Anvi
683 views
+1 vote
1 answer

How to check if a string is in a file, using python?

Hi, Try the below given code: with open('myfile.txt') as ...READ MORE

Jul 5, 2019 in Python by Shabnam
• 930 points
1,709 views
0 votes
1 answer

How do I set a Gtk.StatusIcon as Text?

I don't think that is possible. The ...READ MORE

Jul 31, 2019 in Python by SDeb
• 13,300 points
584 views
0 votes
1 answer

Remove beep from message dialog

You may try switching to wx.lib.agw.genericmessagedialog and see if ...READ MORE

Aug 1, 2019 in Python by SDeb
• 13,300 points
553 views
0 votes
0 answers

How to install tkinter on windows?

Does it work like the other libraries ...READ MORE

Jul 17, 2019 in Python by Waseem
• 4,540 points
1,232 views
0 votes
0 answers

Python error "only size-1 arrays can be converted to Python scalars"

I'm trying to plot the exponential and ...READ MORE

Jul 9, 2019 in Python by JTM
1,559 views
0 votes
1 answer

What is the key difference between self in ruby and self in python?

Ruby and Python are actually very different languages (although ...READ MORE

Jul 30, 2019 in Python by Mohammad
• 3,230 points
701 views
0 votes
1 answer

What are frozen sets in python?

A frozen set in Python is a ...READ MORE

Jun 11, 2019 in Python by Nisa
• 1,090 points
2,728 views
0 votes
0 answers

How do you use an else clause in a while loop in python?

Can you give an example? READ MORE

Aug 5, 2019 in Python by Waseem
• 4,540 points
392 views
+1 vote
2 answers

Difference: abstract class and interface in Python

If abstract class contains only abstract methods ...READ MORE

Jun 21, 2019 in Python by anonymous
7,260 views
0 votes
1 answer

What is list comprehension?

List comprehensions are used for creating new list from another ...READ MORE

Aug 2, 2019 in Python by Mohammad
• 3,230 points
984 views
0 votes
1 answer

Pyglet Image Rendering

I will assume you have something along ...READ MORE

Jul 16, 2019 in Python by SDeb
• 13,300 points
1,188 views
0 votes
1 answer

Low precision and high recall application - Logical regression

In situations where you wish to reduce ...READ MORE

Jun 13, 2019 in Python by Meg
2,608 views
+1 vote
1 answer

Can assignment operator be used to copy elements in Python?

Yes assignment operator can be used to ...READ MORE

Jul 29, 2019 in Python by Neel
• 3,020 points

edited Jul 30, 2019 by Neel 565 views
0 votes
1 answer

Deploying Flask on Windows in production

Installing on Windows is kind of like ...READ MORE

May 29, 2019 in Python by SDeb
• 13,300 points
3,237 views
0 votes
1 answer

How to install PyInstaller?

Hey @Vedant, yes its easier to install ...READ MORE

Jul 4, 2019 in Python by Pooja
1,668 views
0 votes
1 answer

Run two functions at different times

Please refer the below code for your ...READ MORE

Jul 10, 2019 in Python by Rasheed
1,410 views
0 votes
0 answers

How to handle large files using file handling in python?

I have used file handling for smaller ...READ MORE

Aug 2, 2019 in Python by Waseem
• 4,540 points
455 views
0 votes
1 answer

assert keyword in python is used for what purpose?

The assert keyword is used while debugging ...READ MORE

May 24, 2019 in Python by Taj
• 1,080 points
3,424 views
0 votes
1 answer

Python error "error: Unable to find vcvarsall.bat"

Try specifying mingw as the compiler of choice. ...READ MORE

May 29, 2019 in Python by Imran
3,173 views
0 votes
1 answer

Python: convert string to unicode

Suppose you have a string in ASCII form ...READ MORE

Jul 10, 2019 in Python by Olivia
1,350 views
0 votes
1 answer

Is there an equivalent of C’s (?:) ternary operator in python?

Yes, there is. The syntax is as ...READ MORE

Jul 25, 2019 in Python by Alia
697 views
0 votes
1 answer

What are decorators in Python?

Python has an interesting feature called decorators to add ...READ MORE

Jul 19, 2019 in Python by Neel
• 3,020 points
936 views
0 votes
1 answer

Slicing a list using a variable, in Python

Yes its possible. Use the following piece ...READ MORE

Jul 2, 2019 in Python by Wajiha
• 1,950 points
1,669 views
0 votes
1 answer

How to write a regular expression in Python?

The following code should be able to ...READ MORE

Jul 30, 2019 in Python by Arvind
• 3,040 points
444 views
0 votes
1 answer

How to open another window using PyQt

Switch between self.hide() and self.showMinimized() def start(self): ...READ MORE

Oct 1, 2018 in Python by Priyaj
• 58,090 points
13,500 views
0 votes
0 answers

What is the type-error in python?

How to resolve this error, or keep ...READ MORE

Jul 31, 2019 in Python by Waseem
• 4,540 points
447 views
0 votes
1 answer

Where should virtualenvs go in production?

Arguments for grouping in a common folder Cleaner ...READ MORE

Jun 25, 2019 in Python by SDeb
• 13,300 points
1,953 views
0 votes
1 answer

openssl_seal() in Python

I think it should be relatively straightforward ...READ MORE

Jul 24, 2019 in Python by SDeb
• 13,300 points
705 views
0 votes
1 answer

What is the difference between str() and repr() functions in Python?

str() is mostly used to create output ...READ MORE

Jul 8, 2019 in Python by Arvind
• 3,040 points
1,381 views
0 votes
0 answers

how to use linalg condition in python

Aug 2, 2019 in Python by teja
331 views
0 votes
1 answer

No module named urllib3

It is possible that either urllib3 is ...READ MORE

Jan 24, 2019 in Python by SDeb
• 13,300 points
8,491 views
0 votes
1 answer

sys.argv[1] what is the meaning of it?

sys.argv[1] contains the first command line argument passed to your script. For ...READ MORE

Dec 18, 2018 in Python by abc
10,120 views
0 votes
1 answer

What does super() function do in python?

Super function calls the parent class method ...READ MORE

Aug 2, 2019 in Python by Mohammad
• 3,230 points
632 views
0 votes
1 answer

Manually import module - python

I think the following should work: foo.py: from bar ...READ MORE

Jul 30, 2019 in Python by Jinu
427 views
0 votes
1 answer

Is there a list of timezones in python?

import pytz list(pytz.common_timezones) READ MORE

Aug 2, 2019 in Python by Mohammad
• 3,230 points
887 views
0 votes
0 answers

i would like assistance on my code after i input: y = data.temp x = data.drop('temp', axis=1)

This error appeared:      Traceback (most recent call ...READ MORE

Jul 30, 2019 in Python by mimo
443 views
0 votes
1 answer

How to find runtime complexity of funtions that use list in Python?

The Average Case assumes parameters generated uniformly ...READ MORE

Jul 26, 2019 in Python by Arvind
• 3,040 points
550 views
0 votes
1 answer

Populate QComboBox with a list

It looks like you're using the old ...READ MORE

Jul 3, 2019 in Python by SDeb
• 13,300 points
1,530 views
0 votes
0 answers

How to print square of first 100 natural numbers using iterations in python?

Can you make a program with nested ...READ MORE

Jul 22, 2019 in Python by Waseem
• 4,540 points
754 views
0 votes
1 answer

How to install biopython module in python?

To install biopython on your project, simply ...READ MORE

Jul 8, 2019 in Python by Mohammad
• 3,230 points
1,378 views
0 votes
1 answer

How do i kill a thread in python?

In Python, you simply cannot kill a Thread directly. If ...READ MORE

Aug 2, 2019 in Python by Mohammad
• 3,230 points
705 views
0 votes
1 answer

Need help to open excel file and read in Python

You can use pandas module to do ...READ MORE

Jul 22, 2019 in Python by Tina
696 views
0 votes
1 answer

How can you configure python on eclipse?

Install the PyDev plug-in for Eclipse Launch Eclipse. Configure PyDev. Python must be installed to configure PyDev. ...READ MORE

Jul 30, 2019 in Python by Mohammad
• 3,230 points
439 views