You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dailyDashboard = dashboard.setParameter("Escala de Tempo GE Simp 4", "Dia") # Escala de tempo in the dashboard
magDashboard = dashboard.setParameter("Selecione GE Simp 4", "Geração de Energia (GWh)") # Selecione in the dashboard
enddateDashboard = dashboard.setParameter("Fim Primeiro Período GE Simp 4", "1/21/2022") # End period
startdateDashboard = dashboard.setParameter("Início Primeiro Período GE Simp 4", "2/19/2021") # Start period
with pd.ExcelWriter('1.xlsx') as writer:
for t in startdateDashboard.worksheets:
print(t.name)
t.data.to_excel(writer, sheet_name=t.name.split()[-1])
The code above gives wrong values for values in 2022. I have tried every combination I can think of of how to set the parameters (in terms of order etc.) but I don't seem to be able to get what I want. Also if I set a date span of say 10 days, it will still give me over 300 values.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I am trying to set multiple parameters, but I am getting different values if I input different start/end dates, that do not match the dashboard.
from tableauscraper import TableauScraper as TS
import pandas as pd
url = 'https://tableau.ons.org.br/t/ONS_Publico/views/GeraodeEnergia/HistricoGeraodeEnergia?%3Aembed=y&%3Adisplay_count=n&%3AshowAppBanner=false&%3AshowVizHome=n&%3Aorigin=viz_share_link'
ts = TS()
ts.loads(url)
dashboard = ts.getWorkbook()
print(dashboard.getParameters())
dailyDashboard = dashboard.setParameter("Escala de Tempo GE Simp 4", "Dia") # Escala de tempo in the dashboard
magDashboard = dashboard.setParameter("Selecione GE Simp 4", "Geração de Energia (GWh)") # Selecione in the dashboard
enddateDashboard = dashboard.setParameter("Fim Primeiro Período GE Simp 4", "1/21/2022") # End period
startdateDashboard = dashboard.setParameter("Início Primeiro Período GE Simp 4", "2/19/2021") # Start period
with pd.ExcelWriter('1.xlsx') as writer:
for t in startdateDashboard.worksheets:
print(t.name)
t.data.to_excel(writer, sheet_name=t.name.split()[-1])
The code above gives wrong values for values in 2022. I have tried every combination I can think of of how to set the parameters (in terms of order etc.) but I don't seem to be able to get what I want. Also if I set a date span of say 10 days, it will still give me over 300 values.
Any insight into this would be truly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions