Latest questions in Python

0 votes
1 answer

How to print the index of a Pandas Dataframe?

You can do this using the code ...READ MORE

May 13, 2019 in Python by Usha
21,574 views
+1 vote
2 answers

How to display column names of Pandas Dataframe?

print(list(your_df)) READ MORE

Jan 18, 2020 in Python by anonymous
21,883 views
0 votes
3 answers

TypeError: unsupported operand type(s) for -: 'str' and 'str'

& is "bitwise and" operand in Python, you ...READ MORE

Dec 11, 2020 in Python by Rajiv
• 8,910 points
79,502 views
0 votes
1 answer

How to read data from a text file using Python?

Refer to the below example where the ...READ MORE

May 13, 2019 in Python by Sushma
1,277 views
0 votes
1 answer

How to write data to a file in Python?

Refer to the below code. data=’whatever your data ...READ MORE

May 13, 2019 in Python by Shaam
714 views
0 votes
0 answers

what is the use of args and kwargs in python?

can you an example for each? READ MORE

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

can you give an example to get a random sample dictionary?

Check below code thisdict = { "1": ...READ MORE

Nov 25, 2021 in Python by anonymous
378 views
0 votes
1 answer

How to get travis to fail if tests do not have enough coverage for python?

if you add the --fail-under switch to ...READ MORE

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

mapping two numpy arrays

Here's a NumPythonic vectorized approach - B[:,1][(A == ...READ MORE

May 10, 2019 in Python by SDeb
• 13,300 points
2,639 views
0 votes
1 answer

Django 1.7: Makemigration: non-nullable field

As the order field is unique, you'll ...READ MORE

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

Bash alias --> Python 2.7 to Python 3.3

Some linux utilities depend on python2.x currently. ...READ MORE

May 9, 2019 in Python by SDeb
• 13,300 points
2,527 views
0 votes
1 answer

Python web scraping without browser

Yes, you can scape the web without ...READ MORE

May 9, 2019 in Python by John
3,481 views
0 votes
1 answer

How to find the sum of rows in Pandas dataframe?

You can use a combination groupby function with the sum() method. ...READ MORE

May 9, 2019 in Python by Jisha
4,306 views
0 votes
1 answer

How to append a row to a Pandas dataframe?

You can use the append method provided by pandas ...READ MORE

May 9, 2019 in Python by Raj
2,556 views
0 votes
1 answer

Pandas: Print rows if value greater than some value

You can use condition checking for this. ...READ MORE

May 9, 2019 in Python by Reshma
81,416 views
0 votes
1 answer

Pandas print the first few rows of dataframe

Pandas allows you to slice the dataframe ...READ MORE

May 9, 2019 in Python by Shri
5,604 views
0 votes
1 answer

How to select a single column in Pandas?

Pandas allows you to index the dataframe ...READ MORE

May 9, 2019 in Python by Suman
722 views
0 votes
1 answer

Python Pandas: Create series using list of values

You can do this using series method. Refer ...READ MORE

May 9, 2019 in Python by Yogi
1,027 views
0 votes
1 answer

How to check if a substring is present in a string using Python?

To check if the substring exists in ...READ MORE

May 9, 2019 in Python by Sharan
898 views
0 votes
1 answer

Python datetime: How to change month number to month name?

You can use the datetime module to ...READ MORE

May 9, 2019 in Python by Suman
13,172 views
+1 vote
1 answer

Python BeautifulSoup check if find returns Null object

You can add an if condition to ...READ MORE

May 9, 2019 in Python by Ruby
15,627 views
0 votes
0 answers

what is the purpose of the argument 'end' in the print function?

is it necessary to use this argument ...READ MORE

May 9, 2019 in Python by Waseem
• 4,540 points
332 views
0 votes
0 answers

what is python reduce? how do you use it?

can you give an example? READ MORE

May 9, 2019 in Python by Waseem
• 4,540 points
292 views
+1 vote
5 answers

Tkinter error: tkinter.TclError: bad geometry specifier

You have to use the character ‘x’ ...READ MORE

May 9, 2019 in Python by Tina
17,739 views
0 votes
1 answer

How to set window size in Tkinter Python?

The window size adjustment can be done ...READ MORE

May 9, 2019 in Python by Giri
3,563 views
0 votes
1 answer

Python Tkinter: “‘Label’ unresolved” error

You have imported Tkinter as tk but ...READ MORE

May 9, 2019 in Python by Rishi
3,055 views
0 votes
2 answers

Tkinter “module not callable” error.

This error statement TypeError: 'module' object is ...READ MORE

Jun 27, 2019 in Python by rahul
• 360 points
20,563 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
549 views
0 votes
1 answer

Python: Get current system/local time

You can use the datetime module for this. ...READ MORE

May 8, 2019 in Python by Suman
546 views
0 votes
1 answer

Python Pandas: KeyError: False

The reason for this error is that ...READ MORE

May 8, 2019 in Python by Jimmy
10,004 views
0 votes
1 answer

How to replace entire column in pandas dataframe?

Use the dataframe with respective column names ...READ MORE

May 8, 2019 in Python by John
13,551 views
0 votes
0 answers

is there a difference between django and python?

can you give some major differences? READ MORE

May 8, 2019 in Python by Waseem
• 4,540 points
312 views
0 votes
0 answers

how can i contribute to an existing open source project in python?

is there a different platform for this ...READ MORE

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

Is it enough to only create checksum of a zip package instead of each file?

I assume you are asking about the ...READ MORE

May 8, 2019 in Python by SDeb
• 13,300 points
2,938 views
0 votes
0 answers

Does Python's SQLAlchemy support server side cursor?

I want to query a MSSQL database ...READ MORE

May 8, 2019 in Python by ana1504.k
• 7,910 points
1,119 views
0 votes
0 answers

how to add a header to a python request module?

can you give the syntax and an ...READ MORE

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

how do i use the enumerate function inside a list?

Enumerate() method adds a counter to an ...READ MORE

Nov 16, 2021 in Python by Ruhan Siddiqui
2,916 views
0 votes
1 answer

pip wheel conditional dependencies

With the latest version (2017) of the ...READ MORE

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

Python 3.x on python(x,y)?

You can make Python 2 behave the ...READ MORE

May 7, 2019 in Python by SDeb
• 13,300 points
1,914 views
0 votes
0 answers

how do sort the columns in a dataframe using the pandas?

can you give an example using dataframe? READ MORE

May 6, 2019 in Python by Waseem
• 4,540 points
480 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
544 views
0 votes
1 answer

Django session doesn't work in Firefox

You can try this: request.session.modified = True I hope ...READ MORE

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

Exiting a multiprocessed python application safely

I ended up creating a Pipe for ...READ MORE

May 6, 2019 in Python by SDeb
• 13,300 points
1,511 views
0 votes
0 answers

how do i install django in my system for the project?

can you tell me the procedure for ...READ MORE

May 3, 2019 in Python by Waseem
• 4,540 points
481 views
0 votes
0 answers

how do i check the version of opencv?

it there a command to run in ...READ MORE

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

MatPlotLib Scatterplot removal

One of the scatterplot object's methods is ...READ MORE

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

Obtaining stack frame

inspect.stack() will get you the current stack ...READ MORE

May 3, 2019 in Python by SDeb
• 13,300 points
554 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,082 views
0 votes
1 answer

what does a conditional operator in python do?

Conditional operators in python is same as ...READ MORE

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

QKeyPress event in PyQt

You should check event.isAutoRepeat() to determine if ...READ MORE

May 2, 2019 in Python by SDeb
• 13,300 points
2,462 views