Most viewed questions in Python

0 votes
0 answers

How to start Pytest framework studying

Feb 29, 2020 in Python by Maruti
• 120 points
574 views
0 votes
0 answers

I want to extract particular field from nested streaming json that is published through kafka bus.

I have created my kafka consumer. Now ...READ MORE

Apr 17, 2019 in Python by Ash
574 views
0 votes
1 answer

How to list files/directories in python

You can use the os module to list the ...READ MORE

Feb 4, 2019 in Python by Omkar
• 69,230 points
574 views
0 votes
1 answer

I am using a built-in function name as a method identifier and sometimes as an attribute in Python, is this bad?

Hi, good question. The thing is that ...READ MORE

Jan 23, 2019 in Python by Nymeria
• 3,560 points
574 views
0 votes
1 answer

What are the ternary conditional operator in Python?

The Ternary Conditional operator was added in ...READ MORE

Sep 19, 2018 in Python by SDeb
• 13,300 points
574 views
0 votes
1 answer

How do I know what's going to be deleted?

An easy system would be to add ...READ MORE

Aug 28, 2018 in Python by anonymous
574 views
0 votes
0 answers

Does python support encapsulation?

If it does, how is it any ...READ MORE

Jun 17, 2019 in Python by Waseem
• 4,540 points
573 views
0 votes
1 answer

Python math module

pow is built into the language but ...READ MORE

Nov 24, 2018 in Python by SDeb
• 13,300 points
573 views
0 votes
1 answer

SKLearn NMF Vs Custom NMF

The choice of the optimizer has a ...READ MORE

Sep 14, 2018 in Python by Priyaj
• 58,090 points
573 views
0 votes
1 answer

Mini-languages in Python

Pyparsing is handy for writing "little languages". ...READ MORE

Apr 8, 2019 in Python by SDeb
• 13,300 points
572 views
0 votes
1 answer

Are Python sets mutable?

Python sets are data structures which are ...READ MORE

Feb 17, 2022 in Python by Dev
• 6,000 points
571 views
0 votes
1 answer

pandas and Stata 13 files

You can check with the following: Update your ...READ MORE

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

How to add new keys to an already created python dictionary?

my_dict = {'name':'Jack', 'age': 26} my_dict['address'] = 'Downtown' ...READ MORE

Jun 26, 2019 in Python by Neel
• 3,020 points
571 views
0 votes
1 answer

Convert upper case letters to lower case

You can convert upper case to lower ...READ MORE

Nov 21, 2018 in Python by SDeb
• 13,300 points
571 views
0 votes
1 answer

Avoid killing children when parent process is killed

I would recommend against your design as ...READ MORE

Sep 14, 2018 in Python by Priyaj
• 58,090 points
571 views
0 votes
1 answer

Python Significant projects

Hi @Zaid, Have a look at this ...READ MORE

Jun 7, 2019 in Python by Ishaan
570 views
0 votes
1 answer

Get dimensions of a video file

You can try using mediainfo from python. ...READ MORE

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

How does slice notation in Python work?

The Python tutorial talks about it (scroll down a ...READ MORE

Oct 31, 2018 in Python by Priyaj
• 58,090 points
570 views
0 votes
1 answer

Python Pandas Dataframe: How to remove blankspaces on the left side of the string?

You can do it as follows: idx = ...READ MORE

May 14, 2019 in Python by Kunal
569 views
0 votes
1 answer

Creating a matrix in Python

You can create arrays of any number ...READ MORE

Jun 19, 2018 in Python by Hamartia's Mask
• 1,580 points
569 views
0 votes
1 answer

Count the frequency of all list items

You can do this using a dictionary: dict((i, ...READ MORE

May 3, 2018 in Python by Nietzsche's daemon
• 4,260 points
569 views
0 votes
1 answer

How to manipulate a numpy?

You can use the below code slice ...READ MORE

Jul 24, 2019 in Python by Hari
568 views
0 votes
1 answer

Connect to a MySQL DB in python?

db = MySQLdb.connect(host="localhost", # ...READ MORE

Jul 20, 2018 in Python by Nietzsche's daemon
• 4,260 points
568 views
0 votes
1 answer

Using sequences

Lists are like arrays, except that their ...READ MORE

Jun 14, 2018 in Python by Hamartia's Mask
• 1,580 points
568 views
0 votes
1 answer

What is the patterns package in python used for?

Pattern is a web mining tool in ...READ MORE

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

nltk NgramModel error

This is an open issue because of ...READ MORE

May 15, 2019 in Python by SDeb
• 13,300 points
566 views
0 votes
1 answer

Open-Source Forum with API

phpBB would be the first that comes ...READ MORE

Mar 5, 2019 in Python by SDeb
• 13,300 points
566 views
0 votes
1 answer

Using Python what kind of applications can be built?

http://en.wikipedia.org/wiki/List_of_Python_software  follow the link and You will see ...READ MORE

Nov 14, 2018 in Python by Theodor
• 740 points
566 views
0 votes
1 answer

How to remove the last object from a list?

Hi, @Roshni, Try running the following piece of ...READ MORE

Jun 26, 2020 in Python by Gitika
• 65,910 points
565 views
0 votes
0 answers

For some reason i cannot click on this element/button and have been trying for hours PLEASE HELP!!

from selenium import webdriver from selenium.webdriver.chrome.options import Options from ...READ MORE

Jun 18, 2020 in Python by Justin
• 140 points

reshown Jun 18, 2020 by Sirajul 565 views
0 votes
1 answer

How do I sort a dictionary by value?

It is not possible to sort a ...READ MORE

Jul 30, 2018 in Python by Priyaj
• 58,090 points
565 views
0 votes
1 answer

example of mypy with static typing

Have a look at this example: import sys import ...READ MORE

Jun 7, 2019 in Python by Althier
564 views
0 votes
0 answers

what is the scope of the variable in a conditional statement?

what are global and local variables in ...READ MORE

Apr 17, 2019 in Python by Waseem
• 4,540 points
564 views
0 votes
1 answer

Create a GUID/UUID in Python

The uuid module, in Python 2.5 and ...READ MORE

Nov 22, 2018 in Python by SDeb
• 13,300 points
564 views
0 votes
0 answers

matrix multiplication of arrays in python

I am having trouble finding a solution ...READ MORE

Aug 2, 2022 in Python by krishna
• 2,820 points
563 views
0 votes
1 answer

return [x + y for x, y in zip(a, b)]

Hello @Ahmad, Could you please explain your workaround ...READ MORE

Nov 3, 2020 in Python by Gitika
• 65,910 points
563 views
0 votes
1 answer

how do i get the list of all the keys in my dictionary?

my_dict = {'one': 'first', 'two': 'second', 'three': ...READ MORE

Sep 30, 2020 in Python by VJ_python
563 views
0 votes
1 answer

What is the use of '==' operator in dictionary in Python?

Yes you can use '==' operator to ...READ MORE

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

Change date and time format in Python.

Try the following code: date=time.split(‘ ’) time=dat ...READ MORE

May 8, 2019 in Python by Sagar
562 views
0 votes
1 answer

How to set a random seed for prn generation?

The main python module that is run ...READ MORE

Feb 4, 2019 in Python by charlie_brown
• 7,720 points
562 views
0 votes
1 answer

how to get mongoengine object id in flask program

Check out the documentation, Document.objects is a QuerySet object. You seem to be ...READ MORE

Oct 10, 2018 in Python by Priyaj
• 58,090 points
562 views
0 votes
1 answer

Monkey Patching

Dynamically modifying a class or module at ...READ MORE

Jul 20, 2018 in Python by Priyaj
• 58,090 points
562 views
0 votes
1 answer

Conflicting dependencies of pypyodbc and blpapi

I figured out that pypyodbc only works ...READ MORE

Oct 9, 2018 in Python by Priyaj
• 58,090 points
561 views
0 votes
1 answer

Deleting a dictionary entry in Python

Use pop(): mapping.pop("key_x") #key_x is a key entry Note ...READ MORE

May 2, 2018 in Python by Nietzsche's daemon
• 4,260 points
561 views
0 votes
1 answer

How Can I log a Python error with debug information?

Hii, Using exc_info options may be better, to allow you ...READ MORE

May 27, 2020 in Python by Niroj
• 82,880 points
560 views
0 votes
0 answers

print(lst[-2:-4]) is not possible why?

Mar 13, 2020 in Python by Anubhuti
• 120 points
559 views
0 votes
1 answer

Is it possible to create a dictionary with multiple keys for a single value?

One thing that you can do here ...READ MORE

Jul 24, 2019 in Python by Arvind
• 3,040 points
559 views
0 votes
0 answers

How do you parse a string in python?

After splitting the string, how does parsing ...READ MORE

Jul 8, 2019 in Python by Waseem
• 4,540 points
559 views
0 votes
0 answers

How can I make a snake game using python?

Is there a separate library just meant ...READ MORE

May 13, 2019 in Python by Waseem
• 4,540 points
559 views
0 votes
1 answer

HI Mr / Mrs I have problem with my jupiter notebook when i try to learn Your video about Machine Learning. Can You help me please ?

Hi@Herlambang, I think you have a 32-bit system. ...READ MORE

Dec 18, 2020 in Python by MD
• 95,440 points
558 views