Latest questions in Python

0 votes
1 answer

How to split a string to array in Python?

This way you can split your string ...READ MORE

Mar 4, 2019 in Python by Priyaj
• 58,090 points
4,693 views
0 votes
1 answer

Add one row to pandas DataFrame

You can try the following : >>> import ...READ MORE

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

Transpose list of lists

You can try the following and see ...READ MORE

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

Install Python on Ubuntu

@Abha you are right about pre-installation of python, ...READ MORE

Mar 1, 2019 in Python by Pratibha
• 3,690 points
882 views
0 votes
1 answer

What is the purpose of Zope Interfaces?

You can actually test if your object ...READ MORE

Feb 28, 2019 in Python by SDeb
• 13,300 points
808 views
0 votes
1 answer

Print Delimited list

You can try the following and see ...READ MORE

Feb 28, 2019 in Python by SDeb
• 13,300 points
529 views
0 votes
1 answer

How to install python

@Akanksha if you are new to python, ...READ MORE

Feb 28, 2019 in Python by Anvi
• 14,150 points
1,026 views
0 votes
1 answer

What is the use of Tkinter,Flask and Django? What is the main use of them? Can any of them help me in freelancing?

Hey, all the tools that you have ...READ MORE

Feb 27, 2019 in Python by Priyaj
• 58,090 points
11,369 views
0 votes
1 answer

How to remove all characters before a specific character in Python?

Use re.sub. Just match all the chars ...READ MORE

Feb 27, 2019 in Python by SDeb
• 13,300 points
9,776 views
0 votes
1 answer

Debug Pylons application through eclipse

First you can create a new launch ...READ MORE

Feb 27, 2019 in Python by SDeb
• 13,300 points
494 views
0 votes
5 answers

What to study in Python to do freelancing using this?

Hello, you are on the right track. ...READ MORE

Feb 27, 2019 in Python by Priyaj
• 58,090 points
803 views
0 votes
1 answer

How to change python version into 3.7.2 for entire pycharm jetbrains IDE projects?

Navigate to the Project page, select the configured interpreters ...READ MORE

Feb 27, 2019 in Python by Priyaj
• 58,090 points
2,972 views
0 votes
3 answers

Is python version 3.7.2 supported by pycharm jetbrains IDE?

Yes it works fine.. READ MORE

Feb 28, 2019 in Python by Pratosh kumar
1,117 views
0 votes
1 answer

Shift all indices in NumPy array

You can use the following : y = ...READ MORE

Feb 26, 2019 in Python by SDeb
• 13,300 points
4,695 views
0 votes
1 answer

python 'x days ago' to datetime

You just need a timedelta and try ...READ MORE

Feb 26, 2019 in Python by SDeb
• 13,300 points
2,549 views
0 votes
2 answers

argparse argument order

Using Pisa will serve your needs.. READ MORE

Feb 28, 2019 in Python by Pratosh kumar
883 views
0 votes
1 answer

How do you configure Django to send mail through Postfix?

You can do this by adding  settings.py ...READ MORE

Feb 25, 2019 in Python by SDeb
• 13,300 points
4,602 views
0 votes
1 answer

How to find cos(60) in radin measure after importing math function

Hi Kushal!  If you have the value of ...READ MORE

Feb 22, 2019 in Python by Omkar
• 69,230 points
1,099 views
+1 vote
1 answer

Not able to Import scikitplot package in my Jupyter Lab

To overcome this issue, you need to ...READ MORE

Feb 21, 2019 in Python by Yami
11,415 views
0 votes
1 answer

Best way to open a socket in Python

Opening sockets in python is pretty simple. ...READ MORE

Feb 21, 2019 in Python by SDeb
• 13,300 points
529 views
0 votes
1 answer

Getting first row from sqlalchemy

Use  query.one() to get one result. In ...READ MORE

Feb 21, 2019 in Python by SDeb
• 13,300 points
5,538 views
0 votes
1 answer

Add string in a certain position

Python Strings are immutable. >>> s='355879ACB6' >>> s[4:4] = ...READ MORE

Feb 20, 2019 in Python by SDeb
• 13,300 points
1,018 views
0 votes
1 answer

Get object by id()

You'll probably want to consider implementing it ...READ MORE

Feb 20, 2019 in Python by SDeb
• 13,300 points
1,183 views
0 votes
1 answer

Need help understanding python code

In this particular code, I think you ...READ MORE

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

Is there a Python equivalent to `perl -pi -e`?

The command line usage from 'python -h' ...READ MORE

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

Get business days between start and end date using pandas

You can use BDay() to get the ...READ MORE

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

How to output the rows which are affected using SQLAlchemy in Python?

Hi, good question. This is actually not ...READ MORE

Feb 15, 2019 in Python by Nymeria
• 3,560 points
3,034 views
0 votes
1 answer

How can I prevent brute force login attacks using Django in Python?

Hi. Django-axes is an already existing application ...READ MORE

Feb 15, 2019 in Python by Nymeria
• 3,560 points
2,290 views
0 votes
1 answer

Error installing BeautifulSoup

You can use a simple command to ...READ MORE

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

When is the perfect time to use Tornado in python?

There is a server and a webframework. ...READ MORE

Feb 14, 2019 in Python by aryya
• 7,450 points
1,299 views
0 votes
1 answer

How to properly print timezone information using python?

Part of the problem here is that ...READ MORE

Feb 14, 2019 in Python by aryya
• 7,450 points
1,361 views
0 votes
2 answers

How to add a certain time delay to the code using Python?

You can use time.sleep(duration in second) READ MORE

Feb 14, 2019 in Python by Shashank
• 1,370 points
890 views
0 votes
1 answer

What is the equivalent of Django's get_or_create om SQLAlchemy using Python?

As far as I know, there is ...READ MORE

Feb 14, 2019 in Python by Nymeria
• 3,560 points
3,299 views
0 votes
1 answer

K-means or Hierarchical clustering?

You can use hierarchical clustering for this ...READ MORE

Feb 14, 2019 in Python by Dinesh
662 views
0 votes
1 answer

Python script for how much total salary cost has increased

Here you can use groupby() and mean() to get the desired ...READ MORE

Feb 14, 2019 in Python by Umar
1,458 views
0 votes
1 answer

Help fixing the pandas error.

Try this: Uninstall python with admin privileges. Shut down ...READ MORE

Feb 14, 2019 in Python by Saru
8,854 views
0 votes
1 answer

Number of private variables in class

In Python, there is no existence of ...READ MORE

Feb 13, 2019 in Python by Prateek
302 views
0 votes
1 answer

text = _whitespace_only_re.sub('', text) TypeError: expected string or bytes-like object

This seems like an issue with textwrap ...READ MORE

Feb 13, 2019 in Python by Omkar
• 69,230 points
8,727 views
0 votes
1 answer

How to filter HTML tags and resolve entities using Python?

Him the answer is a pretty simple ...READ MORE

Feb 13, 2019 in Python by Nymeria
• 3,560 points
1,913 views
0 votes
1 answer

How can I go about using var == False in Python?

Hi. Simple answer.  All you need to do ...READ MORE

Feb 13, 2019 in Python by Nymeria
• 3,560 points
513 views
0 votes
1 answer

Program to store the details multiple employees

import random class Bank: ...READ MORE

Feb 13, 2019 in Python by Omkar
• 69,230 points
2,062 views
0 votes
1 answer

Can we access Outer class member from an Inner class in Python?

If you want to access outer class ...READ MORE

Feb 13, 2019 in Python by Omkar
• 69,230 points
12,445 views
0 votes
1 answer

How to resolve ImportError: cannot import name 'add' in python ?

There's no module called "add" in random. ...READ MORE

Feb 13, 2019 in Python by Mark
4,401 views
0 votes
1 answer

Sort a part of a list in place

You can write it as such: a[i:j] = ...READ MORE

Feb 12, 2019 in Python by SDeb
• 13,300 points
3,167 views
0 votes
1 answer

Adding two pandas dataframes

you can try the following: x.add(y, fill_value=0) import pandas ...READ MORE

Feb 12, 2019 in Python by SDeb
• 13,300 points
9,394 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,259 views
0 votes
1 answer

How do I check if input string is a valid regular expression or not in Python?

Hi. Good question! Well, just like what ...READ MORE

Feb 12, 2019 in Python by Nymeria
• 3,560 points
10,825 views
0 votes
1 answer

Embed R code in python

You can try this : from rpy import ...READ MORE

Feb 11, 2019 in Python by SDeb
• 13,300 points
862 views
0 votes
1 answer

How to increase plt.title font size?

Try the following : import matplotlib.pyplot as plt plt.figtext(.5,.9,'Temperature', ...READ MORE

Feb 11, 2019 in Python by SDeb
• 13,300 points
913 views