New to ponogramming - Need help with a table

Hi

I am new to python/pandas etc.

I have table 1 and table two.

Table 1 - dataframe
Table 1

I want to create a new table by doing the following:

  1. Select rows in table 2 where the string in the ‘postcode’ column starts with the first 3 characters of ‘Postcode’ in table 1.

  2. Then create a new table with the result (the rows selected from step 1 above).

Kindly help me out with the python/pandas codes for the above.

Thank you.

Table 2 - dataframe