@wooddenbowl maybe you can tell us more about the error and about your code. In Windows it seems to work just fine.
import knime.scripting.io as knio
import pandas as pd
from datetime import datetime
# 获取当前日期 (Get the current date)
current_date = datetime.now()
end_date = pd.Timestamp(current_date)
print(end_date)
start_date = end_date - pd.DateOffset(years=1) - pd.offsets.MonthBegin()
print(start_date)
# 创建 pandas DataFrame (Create pandas DataFrame)
date_range_df = pd.DataFrame({
'起始日期': [start_date.strftime('%Y-%m-%d')], # Start Date
'结束日期': [end_date.strftime('%Y-%m-%d')] # End Date
})
knio.output_tables[0] = knio.Table.from_pandas(date_range_df)