Monthly Archives: June 2014

Pandas : how to compare dataframe with None

Tweet While comparing a pandas dataframe with None,

I got this error:

I could go around the problen using the isinstance command:

In fact, the first code could be changed just slightly by replacing the comparison operator … Continue reading

Posted in Python | Tagged | Leave a comment

pygame installation not working due to “linux/videodev.h: No such file or directory” error

Tweet I wanted to install the python package called pygame. I encountered quite a few issues before being able to install it. I’m reporting here some of the solutions. Before starting, keep in mind that you can install pygame using … Continue reading

Posted in Python | Tagged | Leave a comment

perl: define a module to be called in another script

Tweet First, define a module. The module must be in a path reachable by perl (e.g., local directory). Then, to make a script a valid package, you need to proceed as follows: Rename the perl script with the extension .pm … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

sed: how to add text at the end of the file

Tweet Use the $a syntax and sed:

-i parameter means in place. A previous post explained how to insert a line anywhere but for completeness here it is again:

Posted in Linux | Tagged | Leave a comment