I would like to increase the white space between the last data point on the two-line graphs and the secondary y-axis. Right now the endpoints are being squeezed to the extreme end. My graph is shown below.

You can accomplish this by adding blank spaces to the prefix of each of the y-axis tickmarks on the secondary y-axis. I've done this with some finance timeseries data below.
import pandas as pd
import plotly.graph_objects as go
from plotly.subplots import make_subplots
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv')
fig = make_subplots(specs=[[{"secondary_y": True}]])
fig.add_trace(go.Scatter(
    x=df['Date'], 
    y=df['AAPL.High'],
    name='AAPL High'),
    secondary_y=False
)
fig.add_trace(go.Scatter(
    x=df['Date'], 
    y=df['AAPL.Volume'],
    name='AAPL Volume'),
    secondary_y=True
)
## add as many spaces as desired
fig.update_yaxes(tickprefix = "         ", secondary_y=True)
fig.show()

The easiest way is to add nan values at the end of your dataframe with next dates index. Something like that work :
last_date = pd.to_datetime(df.index[-1])
for i in range(20):
    last_date = last_date+datetime.timedelta(days=1)
    df.loc[last_date] = np.nan
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With