Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
IntegerMan opened this issue Oct 25, 2023 · 1 comment

Comments

@IntegerMan
Copy link
Contributor

IntegerMan commented Oct 25, 2023

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.

@kMutagene
Copy link
Collaborator

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?

@plotly plotly locked and limited conversation to collaborators Jan 3, 2024
@kMutagene kMutagene converted this issue into discussion #437 Jan 3, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants