<jupyter_start><jupyter_text><jupyter_code># from google.colab import drive
# drive.mount('/content/gdrive')
# df = pd.read_csv('/content/gdrive/My Drive/MF/AxisBluechipDirect.csv')
import pandas as pd
raw_git_CSV_path='https://raw.githubusercontent.com/tusharadi25/MF_suggestions/master/AxisBluechipDirect.csv'
df=pd.read_csv(raw_git_CSV_path)

print(df)
df=df.loc[df['plan_code'] == 'DG']
print(df)
data=dict(zip(df.NAV_Date,df.NAV_Value))
print(list(data.items())[:5])

  
filterDict={}
for date in data.keys():
  filterDict[date[3:]]={}
for date in data.keys():
  filterDict[date[3:]][date[:2]]=data.get(date)
print(list(filterDict.items())[:5])
import operator
for month in filterDict.keys():
  base_Nav=0
  for day in filterDict[month].keys():
    if base_Nav is 0:
      base_Nav=filterDict[month][day]
    filterDict[month][day]-=base_Nav

print(list(filterDict.items())[:5])

dist={}
for month in filterDict.keys():
  low=0
  lowDate=1
  for day in filterDict[month].keys():
    if low > filterDict[month][day]:
      low = filterDict[month][day]
      lowDate=int(day)
  dist[month]=lowDate
print(dist)
def findCounts(arr, n): 
    i = 0
    while i<n: 
        if arr[i] <= 0: 
            i += 1
            continue
        elementIndex = arr[i] - 1
        if arr[elementIndex] > 0: 
            arr[i] = arr[elementIndex] 
            arr[elementIndex] = -1 
        else: 
            arr[elementIndex] -= 1
            arr[i] = 0
            i += 1
  
    print ("Below are counts of all elements") 
    for i in range(0,n): 
        print ("%d -> %d"%(i+1, abs(arr[i]))) 
    print ("") 
  

findCounts(list(dist.values()),31) 
print(dist)<jupyter_output>Below are counts of all elements
1 -> 5
2 -> 0
3 -> 2
4 -> 0
5 -> 0
6 -> 0
7 -> 4
8 -> 1
9 -> 3
10 -> 0
11 -> 1
12 -> 0
13 -> 2
14 -> 1
15 -> 0
16 -> 2
17 -> 1
18 -> 0
19 -> 0
20 -> 0
21 -> 0
22 -> 1
23 -> 0
24 -> 0
25 -> 1
26 -> 2
27 -> 1
28 -> 2
29 -> 0
30 -> 1
31 -> 1

{'01-2013': 1, '02-2013': 28, '03-2013': 22, '04-2013': 9, '05-2013': 3, '06-2013': 26, '07-2013': 31, '08-2013': 28, '09-2013': 3, '10-2013': 1, '11-2013': 13, '12-2013': 16, '01-2014': 30, '02-2014': 13, '03-2014': 1, '04-2014': 7, '05-2014': 7, '06-2014': 1, '07-2014': 14, '08-2014': 8, '09-2014': 25, '10-2014': 16, '11-2014': 1, '12-2014': 17, '01-2015': 7, '02-2015': 9, '03-2015': 26, '04-2015': 27, '05-2015': 7, '06-2015': 11, '07-2015': 9, '08-2015': 26, '09-2015': 7, '10-2015': 1, '11-2015': 18, '12-2015': 9, '01-2016': 21, '02-2016': 11, '03-2016': 1, '04-2016': 7, '05-2016': 23, '06-2016': 24, '07-2016': 1, '08-2016': 3, '09-2016': 29, '10-2016': 17, '11-2016': 21, '12-2016': 26, '01-2017': 1, '02-2017': 1, [...]
{'fraction_non_alphanumeric': 0.22031366691560866, 'fraction_numerical': 0.18110530246452577, 'mean_word_length': 2.9571639586410634, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 38, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '293846', 'license': 'Apache-2.0', 'n_tokens_mistral': 1457, 'n_tokens_neox': 1096, 'n_words': 285, 'path': 'MF_Suggestions.ipynb', 'repo_name': 'tusharadi25/BNS', 'size': '2678'}