Most voted questions in Python

0 votes
1 answer

opencv Unable to stop the stream: Inappropriate ioctl for device

I have solved this issue on Ubuntu ...READ MORE

Jul 20, 2019 in Python by SDeb
• 13,300 points
2,999 views
0 votes
1 answer

PEP8 space after a comma

I guess the reason that most people ...READ MORE

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

how does sorted function works in python?

How are the arguments passed in the ...READ MORE

Jul 19, 2019 in Python by Waseem
• 4,540 points
393 views
0 votes
0 answers

how do you install python modules in mac os?

Is it different from installing modules in ...READ MORE

Jul 19, 2019 in Python by Waseem
• 4,540 points
488 views
0 votes
0 answers
0 votes
1 answer

How to install tensorflow in Python?

If you are using Anaconda then you ...READ MORE

Jul 19, 2019 in Python by Neel
• 3,020 points
1,880 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
974 views
0 votes
1 answer

How to convert multiple columns to string in pandas dataframe?

Hi, To convert multiple columns to string, include a list of ...READ MORE

Jul 19, 2019 in Python by Taj
• 1,080 points
27,016 views
0 votes
1 answer

How to iterate over row in a Dataframe in Pandas?

Hi, You can use df.iterrows(), it yields both ...READ MORE

Jul 19, 2019 in Python by Taj
• 1,080 points
2,727 views
0 votes
1 answer

How to perform string operations on every element of a list of strings?

This can be done using list comprehension ...READ MORE

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

How to perform string operations on every element of list ?

I have a list of words in ...READ MORE

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

Is it possible to access .NET code written in C# from Python?

If you want to mainly base your ...READ MORE

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

How to sort two different lists with same common value?

list1 = [ ["name1", 100], ["name2", 33], ...READ MORE

Jul 18, 2019 in Python by Waseem
• 4,540 points
352 views
0 votes
0 answers

Why is selenium css and xpath selector not working?

selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: An invalid or ...READ MORE

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

Sort (hex) colors to match rainbow

Here's a function that, given a color ...READ MORE

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

Connect to two databases

If you don't specify the database in ...READ MORE

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

how to check whether a string starts with a particular word?

For this, you can use the built-in ...READ MORE

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

Is it possible to find the source code of built-in functions of Python?

Since Python is open source you can ...READ MORE

Jul 17, 2019 in Python by Neel
• 3,020 points
4,418 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,247 views
0 votes
1 answer

How to get the ASCII values of a character in python?

You can get the ASCII value of ...READ MORE

Aug 23, 2020 in Python by Sajetha Selva
9,054 views
0 votes
1 answer

What is abs in Python?

The abs() method returns the absolute value ...READ MORE

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

How to find the type of variable in Python?

i=277 type(i) # int i = 2.56j type(i) # complex i ...READ MORE

Jul 16, 2019 in Python by Arvind
• 3,040 points
613 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
655 views
0 votes
0 answers

How does pillow work in opening and closing images in python?

Is there a separate library that we ...READ MORE

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

KDE in seaborn distplot()

Kernel Density Estimation (KDE) is a way ...READ MORE

Jul 16, 2019 in Python by Kunal
2,752 views
0 votes
1 answer

SyntaxError: Missing parentheses in call to "print".

The statement print "hello python" does not work in ...READ MORE

Jul 16, 2019 in Python by Umar
7,762 views
0 votes
1 answer

Python Slicing operation

The difference in the output which you ...READ MORE

Jul 16, 2019 in Python by Kiran
452 views
0 votes
1 answer

How to eliminate out outliers in a dataframe?

There are various ways we can replace ...READ MORE

Jul 16, 2019 in Python by Dinesh
1,950 views
0 votes
1 answer

What data format for large files in R?

Zipping won't help you, as you'll have ...READ MORE

Jul 16, 2019 in Python by SDeb
• 13,300 points
575 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,211 views
0 votes
1 answer

Generators with plots

Yes, you can. I tried doing it ...READ MORE

Jul 16, 2019 in Python by Wajiha
• 1,950 points
807 views
0 votes
1 answer

Is it possible to print a string and a variable in a single print statement in Python?

This can be done using simple string ...READ MORE

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

How to access specific columns from a csv file?

Instead of using csv module in Python, ...READ MORE

Jul 15, 2019 in Python by Neel
• 3,020 points
11,701 views
0 votes
1 answer

what is webserver in python?

The Apache HTTP Server has been the most commonly ...READ MORE

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

What are data structures in python?

Data structures in python are basically the ...READ MORE

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

char list from 0 to f

The simplest way would be a list ...READ MORE

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

Undefined Behaviour in Python

Python evaluates expressions from left to right. ...READ MORE

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

UnicodeDecodeError: "utf-8" codec can"t decode byte 0xeb in position 8: unexpected end of data

To read this dataset use encoding as ...READ MORE

Jul 15, 2019 in Python by Rishi
31,775 views
0 votes
1 answer

DataFrame slicing in Python

You can use criteria based subset for ...READ MORE

Jul 15, 2019 in Python by Sakra
606 views
0 votes
1 answer

Construct an array with Nan elements

Create a numpy array with nan value ...READ MORE

Jul 15, 2019 in Python by Yogi
2,448 views
0 votes
1 answer

Python: Splitting numPY 2 D Array

For splitting the 2d array,you can use ...READ MORE

Jul 15, 2019 in Python by Siri

edited Oct 7, 2021 by Sarfaraz 16,603 views
0 votes
1 answer

How to create LIST from CSV file in Python?

You can use the pandas library for this which ...READ MORE

Jul 15, 2019 in Python by Karan
6,895 views
0 votes
1 answer

Generator Expressions vs. List Comprehension

Generator expression resemble list comprehensions. List comprehensions ...READ MORE

Jul 15, 2019 in Python by Wajiha
• 1,950 points
764 views
0 votes
1 answer

Difference between function and generator?

Normal Functions vs Generator Functions: Generators in Python ...READ MORE

Jul 15, 2019 in Python by Wajiha
• 1,950 points
4,547 views
0 votes
1 answer

i am normalizing the data set iris in python and get the error ::TypeError: 'numpy.float64' object is not callable

TRY THIS   #Nomalisation for i in names:     print(i)   ...READ MORE

Aug 20, 2019 in Python by Noel Deepak Palle
5,534 views
0 votes
1 answer

Python: Megre multiple dataframes into single data frame

You can merge the data frame using ...READ MORE

Jul 14, 2019 in Python by Sharan
11,889 views
0 votes
1 answer

How do you select a python interpreter in Pycharm?

Follow the following steps: Open the settings Open Project ...READ MORE

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

What are the python libraries that can be used to perform web scraping in python?

for web scraping in python we can ...READ MORE

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

How to check whether a string contains alphabets or number in Python?

By using isAlpha () to check whether ...READ MORE

Jul 14, 2019 in Python by Sheik janibasha
4,999 views
0 votes
1 answer

How does garbage collection happen in Python?

The Garbage collection runs automatically as the ...READ MORE

Jul 12, 2019 in Python by Arvind
• 3,040 points
618 views