My job as a data analyst requires me to work with a lot of CSV files.  Well, I came upon one that I couldn’t import into SQL using the SQL Import and Export Wizard nor open and manipulate using Excel.  I knew that python was good for manipulating data but I didn’t have any experience with the language.


The internet being the awesome thing it is, I was able to kit-bash this script together using a number of sources (mostly stackexchange):



import csv

f = open(‘input.csv’)
output = open(‘output.csv’, ‘w’)

csv_f = csv.reader(f)
csv_o = csv.writer((output), lineterminator=’\n’)

for row in csv_f:
csv_o.writerow([row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8], row[9], row[10], row[11], row[12], row[13], row[14]])




Now I’m sure there is a sexier way to write a bunch of sequential columns to a new CSV. 🙂 But I was running out of time. Maybe something I look at for the future.


Netflix on the Xbox

I wasn’t feeling well today so I spent a lot of time watching Netflix on my Xbox today.

Let’s see…Morning Glory with Rachel McAdams and Harrison Ford.  Great movie, well acted by the principals.  McAdams plays an executive producer for a national morning news show (think The Today Show) that strong arms Ford’s distinguished news caster to co-anchor the program in an effort to boost ratings.  Ford is particularly brilliant, bitter even when he’s being nice and demonstrating why he’s had such a lengthy career.

I also watched Baldr Force EXE.  This is an anime that has a net runner feel to it.  It’s only four episodes, about two hours, and thankfully lacks a lot of the exposition that burdens many anime shows.

I had seen Walking with Dinosaurs when it was first shown on The Discovery channel back when it wasn’t all reality TV like Ice Road Truckers and American Pickers or whatever.  It was worth seeing again.  There’s probably a lot of supposition in the show but it’s still cool to see “real”, “live” dinosaurs.

Finally, I wrapped up the evening with the first episode of The Universe.  I’ve only seen a handful, so the series will be mostly new for me.

I might actually be TV’d out for today!

Gaming Day!

Very muggy today.  So muggy, I think it impacted my run this morning.

I haven’t spent a lot of time on my Xbox lately.  I warmed up Darksiders, which I haven’t played in a while.  Since I’m achievement hunting, I’m playing on Apocalypse difficulty.  This is pretty hard, especially after several months hiatus.  No matter…I did some in-game calisthenics and got to work.  I made it through the Iron Canopy without too much trouble and I’m now going back to clean up and collect missed items.

The family also played a game of Cranium: Disney Family Edition.  The first lap went quickly, so we just kept playing – a second lap of the board essentially.  It was very competitive but Rachel and I just barely beat out Madison and my wife, Jennifer.  It was a fun two hours though!

I finished Three Hearts and Three Lions by Poul Anderson today.  It’s a good book that just flew by for me this week.  It is a fantasy story from the burgeoning days of fantasy writing (it was published in 1961).  I suppose it could be considered a classic of sorts.

The book tells the story of Holger Carlsen, a man caught between our world and another, fantastical one with faeries, dragons, giants, and trolls.  Many of the fantasy tropes recognized by Dungeons & Dragons players must have some origin in this tale, which is itself based somewhat on the tales of earliest medieval France.

It’s a good yarn, in some ways several short tales, and I was reminded fondly of the stories I told and imagined when I was younger.

Watched a bunch of movies over the past few days.

Red Riding Hood wound up being better than I thought it would be.  There’s an element of that Twilight-y, teen love so I’ve been told.  I haven’t actually seen any of the Twilight films.  But there are sound themes covering abuse of power and what fear can do to a community.  Plus, the movie did a good job of hiding the wolf from me at least.

I had never seen Poltergeist but it’s one of my wife’s favorites from childhood.  It’s a pretty freaky movie, even now.  I enjoyed it and so did my younger daughter Madison.

Tonight, the whole family watched Romeo + Juliet, the 1996 retelling of the classic tragedy with Leonardo DiCaprio and Claire Danes.  I’m not sure what the deal is with this retelling.  It’s almost slapstick in the opening scene before settling into a more mature and steady pace.  The beginning almost ruined it for me.  The performances are worthy of a Shakespeare.  It’s crazy to think DiCaprio was only 22 when this movie came out.

I remember not liking They Live when I was a kid.  The pace is a little slow and there is an ending that may dissatisfy.  But that was then and this is now.  It’s a great satire about our consumerism and quest for the almighty dollar.  Roddy Piper is better in the lead role than you might think.

This is making the rounds today.  My two cents…

Proposals one and two, suggesting judicial term limits and Congressional override of judicial decisions, are just silly.  The Senate already has the power to impeach.  I don’t see why this can’t be applied to judges overstepping their authority.

Point three, repealing the 16th Amendment that explicitly allows Congress to collect income tax, is superfluous and I don’t know why it exists frankly.  Sections 7 and 8 of Article I of the Constitution already give Congress the power to raise revenue.

Point four – discussing election laws for Senators – right on.  The 17th Amendment effectively took power from the states.  The states are supposed to serve as a check and balance to the federal government.

Proposal five I support in principal – the rest of us have to make due with a balanced budget.  I don’t see why our government shouldn’t.  But restricting the government’s ability to issue debt may have large, unforeseen consequences.

Points six and seven are big reasons I can’t stand the Republican party.  The party talks about state’s rights and keeping the federal government out our lives and then try to tell us how to live (marriage laws) and what to do with our bodies (abortion).

The Soviet Coup of 1991

It’s a little odd how little press the anniversary of this event is getting.

I was in the Army at the time studying Russian and I was chilled by the possibility that this event might be catalyst that tipped the world into war.  Instead, the coup failed after three days the Soviet Union, the bugaboo of the Western world, ceased to exist four months later.