So function declaration looks like this:
dask.dataframe.from_pandas(data: pandas.core.frame.DataFrame, npartitions: int | None = None, chunksize: int | None = None, sort: bool = True, name: str | None = None)
Then in the code:
if (npartitions is None) == (chunksize is None):
raise ValueError(“Exactly one of npartitions and chunksize must be specified.”)
nrows = len(data)
if chunksize is None:
if not isinstance(npartitions, int):
raise TypeError(
"Please provide npartitions as an int, or possibly as None if you specify chunksize."
)
elif not isinstance(chunksize, int):
raise TypeError(
"Please provide chunksize as an int, or possibly as None if you specify npartitions."
)
So are they or not optional?