I want to convert the following statement into DF select statement:
Select
YY,
PP,
YYYY,
PPPP,
Min(ID) as MinId,
Max(ID) as MaxID
from LoadTable
I have tried the following but it doesnt seem to be working :
df.select(df.ID,df.YY, df.PP,df.YYYY,df.PPPPP).agg({"ID": "max", "ID": "min"}).toPandas().to_csv(outputFile, sep="|", header=True, index=False)