Latest questions in Python

0 votes
0 answers

What is the type-error in python?

How to resolve this error, or keep ...READ MORE

Jul 31, 2019 in Python by Waseem
• 4,540 points
482 views
0 votes
0 answers

How to read data in a bubble sort algorithm in python?

I am not able to read the ...READ MORE

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

Python: ImportError: No module named Crypto.Cipher

Seems like the pycrypto package is not ...READ MORE

Jul 31, 2019 in Python by Hari
23,594 views
0 votes
1 answer

How to open gmail and other menus from Google Apps menu using python selenium

You have to add implicit wait until ...READ MORE

Jul 31, 2019 in Python by Rishi
2,741 views
+1 vote
0 answers

ValueError help with Simple Exponential Smoothing analysis on my data set.

I'm very new, and attempting to teach ...READ MORE

Jul 31, 2019 in Python by Declan

edited Jul 31, 2019 4,023 views
0 votes
0 answers

How to calculate accuracy in a logistic regression model in python?

What accuracy score is considered a good ...READ MORE

Jul 30, 2019 in Python by Waseem
• 4,540 points
1,630 views
0 votes
0 answers

Is it ok to have multiple versions of anaconda installed on our systems?

I have both 2.7 and 3.5 installed ...READ MORE

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

How to check whether something is a variable or a function in Python?

Suppose you have a variable defined in ...READ MORE

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

How to write a regular expression in Python?

The following code should be able to ...READ MORE

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

Difference between end and sep

end and sep are optional parameters of ...READ MORE

Jul 30, 2019 in Python by Wajiha
• 1,950 points
23,950 views
0 votes
1 answer

flush parameter of print in Python

Usually all I/Os are buffered, meaning they ...READ MORE

Jul 30, 2019 in Python by Wajiha
• 1,950 points
6,714 views
0 votes
1 answer

Doubt in numpy.vstack

The vstack function in numpy will stack ...READ MORE

Jul 30, 2019 in Python by Esha
857 views
0 votes
0 answers

i would like assistance on my code after i input: y = data.temp x = data.drop('temp', axis=1)

This error appeared:      Traceback (most recent call ...READ MORE

Jul 30, 2019 in Python by mimo
469 views
0 votes
1 answer

Manually import module - python

I think the following should work: foo.py: from bar ...READ MORE

Jul 30, 2019 in Python by Jinu
499 views
0 votes
1 answer

How do I find current module name in python?

A module can find out its own ...READ MORE

Jul 30, 2019 in Python by Simran
11,448 views
0 votes
1 answer

Is there a scanf() or sscanf() equivalent in python?

There is nothing as such for python. For ...READ MORE

Jul 30, 2019 in Python by Greg
6,854 views
0 votes
0 answers

Why does -22 // 10 return -3? - Python

Why does -22 // 10 return -3 ...READ MORE

Jul 30, 2019 in Python by Ashish
403 views
0 votes
1 answer

How do I specify hexadecimal and octal integers in Python?

To represent an octal integer, precede the octal ...READ MORE

Jul 30, 2019 in Python by Meg
904 views
0 votes
0 answers

How do you wrap a c++ class in python using SWIG?

What is SWIG? Is there a library ...READ MORE

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

How Do You Run A Python Script In Blender?

Blender is a free and open-source 3D ...READ MORE

Jul 30, 2019 in Python by Mohammad
• 3,230 points
8,148 views
+1 vote
1 answer

Can assignment operator be used to copy elements in Python?

Yes assignment operator can be used to ...READ MORE

Jul 29, 2019 in Python by Neel
• 3,020 points

edited Jul 30, 2019 by Neel 634 views
0 votes
1 answer

What are the arguments of sorted() function in Python?

Sorted() sorts any sequence (list, tuple) and ...READ MORE

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

Connect to an URI in postgres

The connection string passed to psycopg2.connect is ...READ MORE

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

Ruby equivalent for Python's “try”?

Use this as an example: begin # ...READ MORE

Jul 29, 2019 in Python by SDeb
• 13,300 points
817 views
+1 vote
1 answer

i still can't find http proxy in system setting

Could be because you don't have the ...READ MORE

Jul 29, 2019 in Python by Anvi
744 views
+1 vote
1 answer

Using filter() and map() together

You are not providing the parameters in ...READ MORE

Jul 26, 2019 in Python by Wajiha
• 1,950 points
1,493 views
0 votes
1 answer

Suing multiple lambda functions together

Yes, lambda functions can be used within ...READ MORE

Jul 26, 2019 in Python by Wajiha
• 1,950 points
471 views
0 votes
1 answer

How can you configure python on eclipse?

Install the PyDev plug-in for Eclipse Launch Eclipse. Configure PyDev. Python must be installed to configure PyDev. ...READ MORE

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

What is the key difference between self in ruby and self in python?

Ruby and Python are actually very different languages (although ...READ MORE

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

What is memoryview in Python 3?

Before we get into what memory views ...READ MORE

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

How to find runtime complexity of funtions that use list in Python?

The Average Case assumes parameters generated uniformly ...READ MORE

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

How to use Python notebooks using Python 3?

This can be done using following steps ...READ MORE

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

How to find path of Python interpreter?

In Python, the sys module has System-specific ...READ MORE

Jul 26, 2019 in Python by Arvind
• 3,040 points
5,440 views
0 votes
1 answer

Run a function after keyboard interrupt in python

Below is the code to run a ...READ MORE

Jul 26, 2019 in Python by Shri
14,471 views
0 votes
1 answer

NumPy Array Indexing

If you want to create a subarray ...READ MORE

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

heapify returns NoneType

The heapify() method transforms the list in-place. This means ...READ MORE

Jul 26, 2019 in Python by SDeb
• 13,300 points
903 views
0 votes
0 answers

How do you create a new class instance using class method in python?

What is the function of super() in ...READ MORE

Jul 26, 2019 in Python by Waseem
• 4,540 points
362 views
0 votes
0 answers

Is game development good in python?

What are the tools and libraries for ...READ MORE

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

Read Nested Json as DataFrame

Here is the code for it. da=[ {"age":34, "id":1, "name":"Tony", "salary":1400, "dept_no":[10,20], "Cntct":{"Phone":[1234567890,9876543210], "state":"NY", ...READ MORE

Jul 25, 2019 in Python by Jimmy
5,862 views
0 votes
1 answer

How to print like printf in Python3?

To print like printf in Python you ...READ MORE

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

Is there an equivalent of C’s (?:) ternary operator in python?

Yes, there is. The syntax is as ...READ MORE

Jul 25, 2019 in Python by Alia
743 views
0 votes
1 answer

Copy object in Python

In general, copy.copy() or copy.deepcopy() works perfectly ...READ MORE

Jul 25, 2019 in Python by Tanishq
480 views
0 votes
1 answer

Callable objects approach vs nested scope approach to create higher order functions - python

Using callable objects has a disadvantage over ...READ MORE

Jul 25, 2019 in Python by Vivan
532 views
0 votes
1 answer

How do you make a higher order function in Python?

You have two choices to create higher-order ...READ MORE

Jul 25, 2019 in Python by Yesha
1,024 views
+1 vote
2 answers

sklearn.cross_validation import train_test_split not working

How ever now its in model selection ...READ MORE

Jul 17, 2020 in Python by karthikeyan
17,954 views
0 votes
1 answer

Why does changing one list, change another - Python

Hey @Aleesha, here when you write x=y, ...READ MORE

Jul 25, 2019 in Python by Kanika
2,315 views
0 votes
0 answers

pass optional or keyword parameters from one function to another in python?

How can I pass optional or keyword ...READ MORE

Jul 24, 2019 in Python by Hari
608 views
+1 vote
3 answers

How do I share global variables across modules? - python

The best way to share global variables ...READ MORE

Jul 24, 2019 in Python by Faiza
135,402 views
0 votes
1 answer

Why do lambdas defined in a loop with different values all return the same result?

Here x is not local to the ...READ MORE

Jul 24, 2019 in Python by Haseeb
1,084 views
0 votes
1 answer

Local and Global parameters rules - python

In python, variables that are only referenced ...READ MORE

Jul 24, 2019 in Python by Alia
464 views