Category Archives: Python

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 gives current date time df[‘new_date_column’] = – 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 »

Data Science – Useful Resources

As I count down the days to the start of the Data Science course I’ve been reading a lot of blogs, books and watching a lot of YouTube & Udemy courses. Having not picked up a stats book for the last 15 years, it’s surprising how much I remember! OK, some of the granular detail… 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 »