Edit python script used as Data entry in Power BI
You can edit the python scripts doing the following steps:

Open Query Editor
At 'Applied steps', the first one, source, contains a small gear symbol just on the right side, click on it.

You can change the script direct into Power Query.
I have a python script and used it to create a dataframe in Power BI. 
Now I want to edit that dataframe in Power BI but don´t enter from scratch as new data because I want to keep all the charts inside my Power BI model.
For example in my old dataframe i specified some dates inside my script so the information was limited to those dates. Now i want to change the dates to new ones but dont want to lose all the model.
df = df