Python
Python
2. Click "Enter Data" option from tab.After click on Enter data option create one blank table and
rename table name as "combined_data" then click on ok button
#Python:
import pandas as pd
df2=df2.rename(columns={"Link Delivered Date":"Link Delivered Date_izo","TCL Status":"TCL
Status_izo","PO No":"PO No_izo"})
df3 = pd.merge(df1, df2, how = 'outer',on="Final Unique id")
required_data=df3 [["Final Unique id","Unique ID","SubStatus","PM Name","Cust_Name","TCL
Status","TCL Status_izo","City","State","BW","Supplier ARC in Inr","Supplier OTC in
INR","Management Status","Management Substatus","Commissioned Ageing","Commissioned
Slab","Tata Comm Feasibility ID","Store Code","Cust_Name","MRC (in USD)","NRC (in
USD)","Installation address","COF Date","Order Login Date","PO No","PO Date","Final Goahead
Date","Link Delivered Date","IZO Provider Name","MRC (INR)","NRC (INR)","SFDC Optimus
Status","IZO Provider Name","First Provider Name(during order login)","Second Provider
Name","Third Provider name"]] # add column header here
required_data.to_csv(r"C:\Users\Kanandha\Documents\ pricing_data.csv",index=False)
#add your local machine path in highlighted part
import paramiko #used for server connection and upload
import os
from datetime import datetime
from os.path import getsize
os.chdir(r"C:\Users\Kanandha\Documents")
import sys
ip='115.114.71.53'
po=22
user='kavitha'
pass1= 'dev0P0werB$'
ssh_client=paramiko.SSHClient() #creating instance of Paramiko SSH Client
ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) #to validate the trust with
machine
ssh_client.connect(ip,port=po,username=user,password=pass1)
sftp = ssh_client.open_sftp() #create object of SFTP which helps for file transfercurrent_month_text
= datetime.now().strftime('%h')
path = "pricing_data.csv"
localpath =r"C:\Users\Kanandha\Documents\ pricing_data.csv"
#add your local machine path in highlighted part where you have saved “pricing_data.csv” file
sftp.put(localpath, path)
6. After selecting OK, Power Query Editor displays a warning about data
privacy For the Python scripts to work properly in the Power BI service, all
data sources need to be set to public or organizational