Python map object is not subscriptable?

Why does the following script give the error: payIntList[i] = payIntList[i] + 1000 TypeError: 'map' object is not s...

how to convert numpy array into tuple?

I need to convert array like this: [[1527 1369 86 86] [ 573 590 709 709] [1417 1000 68 68] [1361 ...

Converting strings to floats in a DataFrame?

How to covert a DataFrame column containing strings and NaN values to floats. And there is another column whose valu...

Run multiple python scripts concurrently?

How can I run multiple python scripts? At the moment I run one like so python script1.py. I've tried python script1...

How to read user input until EOF??

My current code reads user input until line-break. But I am trying to change that to a format, where the user can wr...

Python “Too many indices for array”?

I am reading a file in python using pandas and then saving it in a numpy array. The file has the dimension of 11303...

Get the column names of a python numpy ndarray?

Let's say I have a data file called data.txt that looks like: TIME FX FY FZ 0 10 5 6 1 2 4 7 2 5 2 6 ...

How to append multiple items in one line in Python?

I have: count = 0 i = 0 while count < len(mylist): if mylist[i + 1] == mylist[i + 13] and mylist[i + 2] == m...

Finding range of a numpy array elements?

I have a NumPy array of size 94 x 155: a = [1 2 20 68 210 290.. 2 33 34 55 230 340.. .. .. ... ....

How to move a file??

I looked into the Python os interface, but was unable to locate a method to move a file. How would I do the equivale...

Python equivalent of zip for dictionaries?

If I have these two lists: la = [1, 2, 3] lb = [4, 5, 6] I can iterate over them as follows: for i in range(min(...

initialize a numpy array?

Is there way to initialize a numpy array of a shape and add to it? I will explain what I need with a list example. I...

How do I get rid of the b-prefix in a string in python??

A bunch of the tweets I am importing are having this issue where they read b'I posted a new photo to Facebook' I...

Scipy imsave and imread change format?

When I save the image, the format it has is numpy.uint16, when I load it, it is numpy.uint8, and it messes up the wh...

How can I use conda to install pydot??

Trying to generate some PDF's of decision trees by following some of the sklearn documentation, but can't get Pydot ...