i use instruction_str option on pandas query but the output not send to subquestion output. it just outputing the instruction, here the output:
Generated 1 sub questions.
[Forecast Data pax on CGK] Q: What is the forecasted passenger data for today at CGK Airport
Pandas Instructions:
import pandas as pd
from datetime import datetime, timedelta
# Convert the 'DATE' column to datetime format
df['DATE'] = pd.to_datetime(df['DATE'])
# Get today's date
today = datetime.now().date()
# Filter the dataframe for today's date and CGK Airport
filtered_df = df[(df['DATE'].dt.date == today) & (df['AIRPORT'] == 'CGK')]
# Filter the dataframe for forecasted data
forecasted_df = filtered_df[filtered_df['forecast_or_real'] == 'FORECAST']
# Get the forecasted passenger data
forecasted_passenger_data = forecasted_df['passanger'].sum()
# Print the forecasted passenger data
print(forecasted_passenger_data)
print(forecasted_passenger_data)
149588.0
Pandas Output: None
[Forecast Data pax on CGK] A: None