In solarposition.ephemeris:
# make output DataFrame
DFOut = pd.DataFrame(index=time)
DFOut['apparent_elevation'] = ApparentSunEl
DFOut['elevation'] = SunEl
DFOut['azimuth'] = SunAz
DFOut['apparent_zenith'] = 90 - ApparentSunEl
DFOut['zenith'] = 90 - SunEl
DFOut['solar_time'] = SolarTime
I get an error when assigning ApparentSunEl to the DFOut column:
ValueError: cannot reindex from a duplicate axis
and I believe the reason comes from the fact that DFOut uses time as index and ApparentSunEl uses time_utc as index; and I think it raises an error because in my case time uses daylight saving and contains duplicate indices. Using ApparentSunEl.values instead should solve the issue.