-
Notifications
You must be signed in to change notification settings - Fork 99
Suggestion: Documentation / Examples / Extensions for working with DataFrame objects #437
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
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
- making the core F# API more usable from C# directly, see for example
- auto-generating native C# bindings for the core library
- [C#] Plotly.NET.CSharp Roadmap #379
- Generate C# bindings via code generation based on the core F# API #424
- This is a standalone library called
Plotly.NET.CSharp
and it is available on nuget. It is idiomatic C#, but less complete than the core F# library, which can serve as a fallback.
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 usingnbconvert
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 fromMicrosoft.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 forMicrosoft.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?
Beta Was this translation helpful? Give feedback.