```
entity_data = {'STATE_CD_E': ['NY', 'NY', 'NY'],
           'INTERMEDIATE_NUMBER_E': ['1111', '2222', '3333'],
           'DISTRICT_NUMBER_E': ['123456789012', '123412341234', 
           '121212121212'],
           'FINANCE_NUMBER_E': ['123456', '123412', '121212']  }

df_entity = pd.DataFrame(entity_data, index = ['School_1', 'School_2', 
            'School_3'])

finance_data = {'STATE_CD_F': ['NY', 'NY', 'NY'],
           'INTERMEDIATE_NUMBER_F': ['1111', '2222', '3333'],
           'DISTRICT_NUMBER_F': ['123456', '123412', '121212']  }

df_finance = pd.DataFrame(finance_data, index = ['School_1', 'School_2', 
             'School_3'])

print("\n")
print(df_entity)
print("\n")
print(df_finance)
print("\n")
print("\n")
print("\n")

df_merge = pd.merge(df_entity, df_finance[['INTERMEDIATE_NUMBER_F', 
           'DISTRICT_NUMBER_F']], right_on = ['DISTRICT_NUMBER_F'], left_on= 
           ['FINANCE_NUMBER_E'], how='left')

```

Above is the code I am using. I'm trying to merge two dataframes using pandas. However, I want to join on the left 6 digits of DISTRICT\_NUMBER\_E with DISTRICT\_NUMBER\_F. Is there anyway to do this? If not, can I create a new column in the entity\_data dataframe that takes the left 6 digits of DISTRICT\_NUMBER\_E and then match on that column instead?