Skip to content

DateTime columns cause schema type lookups to fail in DataFrame #5698

@WalternativE

Description

@WalternativE

System information

  • OS version/distro: Windows 10 20H2 19042.844
  • .NET Version (eg., dotnet --info): 5.0.200

Issue

  • What did you do?
    I tried to use the Explore() and ExploreWithSandDance() extension methods on the
    IDataView type of the underlying DataFrame which contained a column of the type
    PrimitiveDataFrameColumn<DateTime>.

  • What happened?
    I received the following error

    Error: System.NotSupportedException: Specified method is not supported.
    at Microsoft.Data.Analysis.PrimitiveDataFrameColumn`1.GetDataViewType()
    at Microsoft.Data.Analysis.PrimitiveDataFrameColumn`1.AddDataViewColumn(Builder builder)
    at Microsoft.Data.Analysis.DataFrame.get_DataViewSchema()
    at Microsoft.ML.DataViewExtensions.ToTabularJsonString(IDataView source)
    at Microsoft.ML.DataViewExtensions.ExploreWithSandDance(IDataView source)
    at <StartupCode$FSI_0011>.$FSI_0011.main@()
    
  • What did you expect?
    I expected the same behavior as when I tried the same procedure with a DataFrame which did not contain a
    DateTime column.

Source code / logs

As explained above I received a NotSupportedException. I assume, that it is connected to the execution of this line
source.Schema.ToDictionary(column => column.Name, column => column.Type.RawType); in the extension method to create the TabularJsonObject here.

I created a notebook which showcases how I stumbled upon the error. It should be possible to use the binder link in the readme for this, even though it botches up the last redirect for some reason.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions