Break, Continue and Pass in Python

  28 Jun 2019
   python

Continue vs Break

Continue

print("The loop will skip the value when value of i is 2 and restart from next value of i - ")
for i in range(0,4):
    if i == 2:
        continue
    else:
        print(i+100)

  Connect to azure datalake store using R

  10 Jun 2019
   azure, r

The following code snippets are on creating a connection to Azure Data Lake Storage Gen1 using R with Service-to-Service authentication with client secret and client id using REST API. Follow the link, for more details on different ways to connect to Azure Data Lake Storage Gen1

  Months between two dates

  30 May 2019
   python

Importing Packages and Datasets

import pandas as pd
import numpy as np
start_date = ['2019-06-03', '2019-06-13', '2018-11-05', '2019-05-31', '2019-06-01', '2019-09-01']
end_date =  ['2019-08-31', '2019-08-23', '2018-11-25', '2019-07-1', '2019-07-31', '2019-10-25']
data = pd.DataFrame(list(zip(start_date,end_date)), columns = ['Start Date', 'End Date'])
Start DateEnd Date
02019-06-032019-08-31
12019-06-132019-08-23
22018-11-052018-11-25
32019-05-312019-07-1
42019-06-012019-07-31
52019-09-012019-10-25