Data Analysis

Debugging Javascript – one useful tool

Posted on

Here’s an idea for displaying those pesky ephemeral variables that come and go like ghosts in JavaScript. Check this out. I want to know if I’m reading in a CSV file properly or not. You can use for any variable / array / object. <script> // Read in a .csv file d3.csv(“../datafile.csv”, function(someData) { debugMe(someData); }); function debugMe(whateverData) […]

Data Analysis

Python Immutable strings, integers, booleans

Posted on

In Python, STRINGS, INTS, BOOLs etc. are IMMUTABLE… meaning, for example, that you cannot convert a df column that is a string to a column that is int.  However,  you can ASSIGN the values (objects) to another variable or create a new instance of that column in another dataframe   … or use .astype(int) to perform […]