Hover Text not showing up when plotting code is within for loop

I have a scattermapbox plot that plots a scatterplot of 1,000’s of points based on a dataframe from a text file over a map based on lat/lon.

I would like the hover text at minimum to show the date/time of each point, would love lat/lon and date/time but I can only seem to get one or the other.

I have 5 text files within the directory, each based on a whole year of data. I created a for loop to run through each file and plot one .html file per year/file. Each plot features two different separated datasets, a drop down menu to show all points and the separated data, and annotations.

I did try to create one plot featured on concatenated dataframe of all years and separate by year in the drop down menu, but the dataframe appears to be too large and causes me numerous issues when trying to separate (only plotting 3 years or so of data and causing the drop down menu to not work properly).

Anyways, the program that plots each year separately with the for loop plots everything properly except the hover text, only showing the lat/lon and then the type or name of that data. I have another, earlier edition of the program that only plot one file, no for loop and it plots properly, including the hover text showing the date/time. In troubleshooting, I have copied the code, and ran each but I keep running into issues.

# Use Scattermap box for satellite maps
data = [
        lat= df_c2c['lat'],
        lon= df_c2c['lon'],
        text = [str(n) for n in df['datetime']],
        hoverinfo = 'text',
        marker = dict(color='yellow', size=5),                      
        name = 'Cloud to cloud',
        legendgroup = 'Cloud to cloud'
        lat= df_c2g['lat'],
        lon= df_c2g['lon'],
        text = [str(n) for n in df['datetime']],
        hoverinfo = 'text',
        marker = dict(color='red', size=5),                      
        name = 'Cloud to ground',
        legendgroup = 'Cloud to ground'
    )   ]   

# Declare Layout    
layout = go.Layout(
    title = 'LTG '+str(year_plt[0])+'',
    font=dict(family='Courier New, monospace', size=18, color='rgb(0,0,0)'),

In the above plotting code, with no text and hoverinfo, it’ll show just the lat/lon. With the text and hoverinfo, it will show the date/time, except when run in the for loop that runs all the files one at a time.

Any help with the solution? Or even just plotting solutions to general issues I had?