I am trying to use C# DataFrames like in the tutorial here:
PrimitiveDataFrameColumn<int> colPositions = new PrimitiveDataFrameColumn<int>("Positions");
I am getting this error:
error CS0315: The type 'int' cannot be used as type parameter 'T' in the generic type or method 'PrimitiveDataFrameColumn<T>'. There is no boxing conversion from 'int' to '?'.
However, it should work, and does work in the interactive Jupyter notebook version on the blog post above.
The PrimitiveDataFrameColumn is defined as follows:
public class PrimitiveDataFrameColumn<[IsUnmanagedAttribute]
T> : DataFrameColumn, IEnumerable<T?>, IEnumerable where T : struct, object
What exactly is the problem here? As I understand it, the generic type must be a non-nullable value type, which int, float and simple structs should all be.