I am able to pull the data using the below code in my Gsheet using the below code.
#AUTHENTICATING THE CREDENTIALS FOR CONNECTING THE SCRIPT TO GSHEET
gc = pygsheets.authorize(service_file='client_secret.json' )
# CONNECTING THE GSHEET
sh = gc.open_by_key('1Fmnp5FUmhvL-3h9yGEmx79ZMmCWaAGLN30D1yDKliC0')
# WRITING THE DATA IN GSHEET
wks = sh[3]
wks.resize(rows=row, cols=column)
wks.set_dataframe(df,(1,1))
With the above code , whenever someone moves the position of the sheet , the code writes data into the tab which is in position 3. I want to replace wks =sh[3] to a code that pulls the data to the particular name of the tab. for example to pull data in the sheet name which is datadump in the workbook.