Trending questions in Python

0 votes
1 answer

Find tag starting with a particular letter using BeautifulSoup?

Try something like this: for tag in soup.find_all(re.compile("^b")): ...READ MORE

Apr 2, 2019 in Python by Taj
1,271 views
0 votes
1 answer

What is the process to kill a particular thread in python?

A multiprocessing.Process can p.terminate() In the cases where I want to ...READ MORE

Feb 4, 2019 in Python by charlie_brown
• 7,720 points
3,718 views
0 votes
0 answers

How to add "," in Json list (python) . Example ["A", "B"]["c", "d"] --> ["A", "B"],["c", "d"]

Apr 18, 2019 in Python by Ashish Mishra

recategorized Apr 19, 2019 by Omkar 644 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
668 views
0 votes
1 answer

Using IDE on AWS EC2

You can try Eclipse (its Python IDE ...READ MORE

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

How to rename column in pandas?

You can use the rename option to ...READ MORE

Apr 3, 2019 in Python by Firoz
1,148 views
0 votes
1 answer

How to remove blank spaces from Python string?

You can use the strip method to do ...READ MORE

Apr 4, 2019 in Python by Rishi
1,095 views
0 votes
0 answers

Bash Commands in Jupyter Notebook

Is it possible to use bash commands ...READ MORE

Mar 28, 2019 in Python by Mishti
• 480 points
1,403 views
0 votes
1 answer

How to handle AssertionError in Python and find out which line or statement it occurred on?

Use the traceback module: import sys import traceback try: ...READ MORE

Dec 18, 2018 in Python by charlie_brown
• 7,720 points
5,696 views
0 votes
1 answer

Python using basicConfig method to log to console and file

Try this working fine(tested in python 2.7) ...READ MORE

Aug 27, 2018 in Python by Priyaj
• 58,020 points
10,530 views
0 votes
1 answer

what is attribute error in python?

import pandas df = pd.read_csv('filename') it will give attribute ...READ MORE

Mar 27, 2019 in Python by Mohammad
• 3,230 points
1,347 views
0 votes
1 answer

How to get path with filename in python?

There is no direct way to get ...READ MORE

Feb 4, 2019 in Python by Omkar
• 69,220 points
3,581 views
0 votes
0 answers

what is a queue in python?

can you give an example? READ MORE

Apr 17, 2019 in Python by Waseem
• 4,540 points
461 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
786 views
0 votes
1 answer

Exclusive values from two Sets in Python

There is a direct function available to ...READ MORE

Mar 27, 2019 in Python by Mugdha
• 600 points
1,332 views
0 votes
1 answer

How to get domain name of email ID?

You can use the split method to split the ...READ MORE

Mar 28, 2019 in Python by Firoz
1,252 views
0 votes
1 answer

Not able to take input in python

You are using python 2 in which ...READ MORE

Jan 31, 2019 in Python by Omkar
• 69,220 points
3,663 views
0 votes
1 answer

How to find all the tags in the page using BeautifulSoup?

Try this code: for tag in soup.find_all(True): ...READ MORE

Apr 2, 2019 in Python by Soumya
1,024 views
0 votes
2 answers

why do we use operator.abs

 python and abs() in Python The abs() take ...READ MORE

Apr 3, 2019 in Python by anonymous
955 views
0 votes
0 answers

what is multiprocessing in python?

can you give an example? READ MORE

Apr 11, 2019 in Python by Waseem
• 4,540 points
611 views
0 votes
1 answer
0 votes
0 answers

what is the procedure to get the hashmap in python?

can you give an example as well? READ MORE

Apr 10, 2019 in Python by Waseem
• 4,540 points
613 views
0 votes
2 answers

what is a class method in python?

Class Method  class method is the method which is ...READ MORE

Apr 8, 2019 in Python by MrBoot
• 1,230 points
1,214 views
0 votes
0 answers

what is the logical AND operator in python?

how do i use it in a ...READ MORE

Apr 12, 2019 in Python by Waseem
• 4,540 points
512 views
0 votes
0 answers

how do i perform XML parsing in python?

can you give me the python code ...READ MORE

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

How to make python script pause for sometime?

You can use the sleep method from the ...READ MORE

Apr 4, 2019 in Python by Hrishi
793 views
0 votes
1 answer

Not able to print cell value by index.

You have wrongly indexed. The index you ...READ MORE

Apr 8, 2019 in Python by Ganesh
614 views
0 votes
1 answer

Count words in a string in Python

You have to use the count method to ...READ MORE

Apr 4, 2019 in Python by Shri
778 views
0 votes
1 answer

How to get all related Django model objects in Python?

This actually gives you the property names ...READ MORE

Nov 14, 2018 in Python by Nymeria
• 3,560 points

edited Dec 18, 2018 by Nymeria 6,850 views
0 votes
0 answers

where and how can i use PYTHONPATH in python?

is there a particular syntax for this?? READ MORE

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

How to search for a word in a string in Python?

You can do it like this: txt = ...READ MORE

Apr 5, 2019 in Python by Kumar
729 views
0 votes
1 answer

how to compare two strings in python?

compare two string in python >>> s1="abc ...READ MORE

Mar 25, 2019 in Python by rajesh
• 1,270 points
1,166 views
0 votes
1 answer

How to capitalize the first word of string?

Refer to the below command: txt = "hello" x = ...READ MORE

Apr 4, 2019 in Python by Giri
711 views
0 votes
1 answer

Alternative to Double Iteration

You don't have to find the removed ...READ MORE

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

formatting_info=true for xlsx file handling

There are 2 libraries used to handle ...READ MORE

Mar 19, 2019 in Python by Omkar
• 69,220 points
1,380 views
0 votes
1 answer

How find all the tag with a particular name using BeautifulSoup?

You can do it like this: for tag ...READ MORE

Apr 2, 2019 in Python by Dinesh
749 views
0 votes
1 answer

pip install web2py

You don't need to install web2py, just ...READ MORE

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

is therer an alternative for execfile in python?

can you give an example if there ...READ MORE

Apr 5, 2019 in Python by Waseem
• 4,540 points
628 views
0 votes
0 answers

what is a bitwise operator in python?

can you show some operations using bitwise ...READ MORE

Apr 8, 2019 in Python by Waseem
• 4,540 points
486 views
0 votes
2 answers

how to use sum() in python?

sum()=sum all item in a tuple  syntax: sum(iterble,start) iterable required. The ...READ MORE

Mar 26, 2019 in Python by rajesh
• 1,270 points
1,027 views
0 votes
1 answer

How to append a Python List?

Please refer to the below code to ...READ MORE

Apr 4, 2019 in Python by Giri
550 views
0 votes
0 answers

how can i read a text file in python?

can you specify the syntax and prequisites ...READ MORE

Apr 4, 2019 in Python by Waseem
• 4,540 points
583 views
0 votes
0 answers

how to print string to text file?

can you give an example? READ MORE

Apr 3, 2019 in Python by Waseem
• 4,540 points
635 views
0 votes
0 answers

can i send an email using python?

can you give me the exact code ...READ MORE

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

Inconsistent Whitespace error occurrence when using Python doctest with newline characters

Hi. It's pretty simple actually. All you ...READ MORE

Feb 12, 2019 in Python by Nymeria
• 3,560 points
2,757 views
+1 vote
1 answer

How to read hdfs file using python?

subprocess.Popen(["hadoop", "fs", "-cat", "/path/to/myfile"], stdou ...READ MORE

Dec 7, 2018 in Python by Omkar
• 69,220 points
5,627 views
0 votes
1 answer

how do i clear the screen in python?

import os os.system('cls') or os.system('clear') READ MORE

Mar 19, 2019 in Python by Mohammad
• 3,230 points
1,191 views
0 votes
1 answer

How to check plural & singular form of a word?

You can try with the inflect 0.2.4 ...READ MORE

Jan 3, 2019 in Python by anonymous
4,425 views
0 votes
1 answer

Flask-PageDown and MathJax

If you want to use the MATHJAX ...READ MORE

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

Can't Click an Element in Python Selenium After Successfully Finding It

I've encountered this problem of not being ...READ MORE

Oct 4, 2018 in Python by Priyaj
• 58,020 points
8,343 views