Tag Archives: DataScience

Python Snippets

Create new data frame including only certain columns data = pd.read_csv(‘data.csv’) #Select first 22 columns and create dataframe df = data[data.columns[:22]] Add new column with the difference between two dates #datetime.new() gives current date time df[‘new_date_column’] = datetime.now() – pd.to_datetime(df[‘date_to_be_calculatd_from’]) Reordering columns cols = list(df.columns.values) cols reindexed = [‘id’, …., ‘last_column_name’] reindexed_df = df.reindex(columns=reindexed) Create… Read More »

Starting out in Data Science

There’s a moment of realisation you have at some point in your career whereby you truly believe the rest of the market is missing a trick. I had the chance to work with someone that fuelled my curiosity, while also hopefully me invigorating him and together we just thought differently. It turned out some of… Read More »