filename and line number of python script?

How can I get the file name and line number in python script. Exactly the file information we get from an exceptio...

ImportError: DLL load failed: The specified module could not be found?

I have installed Python 2.5.4, Numpy 1.5.0 win32, Matplotlib 1.0.0 win32, pywin32 218. Still not able to plot graphs...

Pandas - dataframe groupby - how to get sum of multiple columns?

This should be an easy one, but somehow I couldn't find a solution that works. I have a pandas dataframe which look...

Overriding “+=” in Python? (__iadd__() method)?

Is it possible to override += in Python? ...

How to “test” NoneType in python??

I have a method that sometimes returns a NoneType value. So how can I question a variable that is a NoneType? I need...

Python : Compare two csv files and print out differences?

I need to compare two CSV files and print out differences in a third CSV file. In my case, the first CSV is a old li...

Countdown Clock: 01:05?

How can I create a countdown clock in Python that looks like 00:00 (min & sec) which is on a line of its own. E...

Python can't find file?

I am having great difficulty getting python 3.4 to recognize a path or text file on a windows 8 system. I have tried...

Python KeyError: '\n'?

I use the script below for molecular barcode extraction from fastq files. However, I keep getting the following key ...

matplotlib colorbar in each subplot?

I would like to add a separate colorbar to each subplot in a 2x2 plot. fig , ( (ax1,ax2) , (ax3,ax4)) = plt.subplot...

How do I get the day of week given a date??

I want to find out the following: given a date (datetime object), what is the corresponding day of the week? For in...

How to add an empty column to a dataframe??

What's the easiest way to add an empty column to a pandas DataFrame object? The best I've stumbled upon is somethin...

How do I count unique values inside a list?

So I'm trying to make this program that will ask the user for input and store the values in an array / list. Then wh...