Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Suggestion: Documentation / Examples / Extensions for working with DataFrame objects #437

IntegerMan started this conversation in Ideas
Discussion options

Description

I'm a Die Hard Plotly user in Python and I love Polyglot Notebooks, so I was extremely excited to see that this repository exists and also has a formatter for Polyglot Notebooks / .NET Interactive.

I would like to see more documentation around using Plotly .NET with Microsoft.Data.Analysis.DataFrame objects in C#, and perhaps some extension methods on DataFrame or DataFrameColumn to more easily support using Plotly .NET for visualizing DataFrame objects, as I see this as a primary use case for the library - particularly given Plotly Express' amazing capabilities with Pandas DataFrames in Python.

I know this library is primarily intended for F#, but people will definitely try to use it with C# from Polyglot.

You must be logged in to vote

Replies: 1 comment

Comment options

Hey @IntegerMan, thanks for reaching out.

I know this library is primarily intended for F#

Let me first clarify this, because it is not true. There is significant work done on

  1. making the core F# API more usable from C# directly, see for example
  2. auto-generating native C# bindings for the core library

Also, the split between people asking F# or C# related questions is quite even

I would like to see more documentation around using Plotly .NET with Microsoft.Data.Analysis.DataFrame objects in C#, and perhaps some extension methods on DataFrame or DataFrameColumn to more easily support using Plotly .NET for visualizing DataFrame objects, as I see this as a primary use case for the library - particularly given Plotly Express' amazing capabilities with Pandas DataFrames in Python.

Multiple things to unpack here:

  • Documentation in general indeed is lacking for usage from C#, particularly because it is hard to generate polyglot documentation pages with the current tooling. Ideally, we could use polyglot notebooks for generating the documentation, but there is currently no .NET way of doing that that does not involve hacking around in the ipynb format created by polyglot notebooks and using nbconvert in python. I am however writing a .NET implementation of NBFormat that will be eventually used for generating polyglot documentation.

  • Regarding ease-of-use with dataframes: This is something that i have been thinking a lot about. I know that Microsoft.Data.Analysis.DataFrame is the C# way of using data frames, but that is not true for F#, where Deedle is often used. We are building a F#/.NET data science stack at @fslaborg, and one of the main goals is forming a coherent experience, for which plotly.express-like features are absolutely on the agenda. It is however hard to decide what to do with Deedle. One idea would be implementing the interfaces from Microsoft.Data.Analysis.DataFrame on it and then providing the 'glue' for these features on any type implementing those interfaces. Still a lot of work to do on that front, i just put all of that text here to explain that it is not as easy as just writing functions for Microsoft.Data.Analysis.DataFrame because we have other ecosystem considerations as well.

So TL;DR: This library started out as a F# library that branched out to provide a quite good C# API as well. For plotly.express-like features, there are some ecosystem-specific questions to answer first, before deciding on how to tackle implementation.

It seems like you used the Core F# API from C# right? how was that experience so far? Could you give Plotly.NET.CSharp a spin and see how that compares to it?

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Converted from issue

This discussion was converted from issue #428 on January 03, 2024 08:07.

AltStyle によって変換されたページ (->オリジナル) /