My current code is :
import requests
import base64
import pandas as pd
pat = 'TO BE FILLED BY YOU' #CONFIDENTIAL
authorization = str(base64.b64encode(bytes(':'+pat, 'ascii')), 'ascii')
headers = {
'Accept': 'application/json',
'Authorization': 'Basic '+authorization
}
df = pd.read_csv('sf_metadata.csv') #METADATA OF 3 TABLES CURRENCY,SALES,SF_INVENTORIES
df.set_index('TABLE_NAME', inplace=True,drop=True)
df_test1 = df.loc['CURRENCY']
x1 = df_test1.to_html() # CONVERTING TO HTML TO PRESERVE THE TABULAR STRUCTURE
#JSON FOR PUT REQUEST
SamplePage1 = {
"content": x1
}
#API CALLS TO AZURE DEVOPS WIKI
response = requests.put(
url="https://dev.azure.com/xxx/DIFTEST/_apis/wiki/wikis/xxx.wiki/pages?path=SamplePag1&api-version=6.0", headers=headers,json=SamplePage1)
I am able to get the following output:
I have a variable :
str1 = "View HIST_DUMPS - Dispatch Dump Record\nDatabase name : PROD_WG\nSchema name : MineOPs"
I need to concatenate str1 with x1 so that my output (after executing PUT request) will look like the below:
Can anyone assist me how can i achieve this. Thank you.

