Skip to content

Support more data sources#22

Merged
philippjfr merged 51 commits into
panel-extensions:mainfrom
MarcSkovMadsen:enhancement/more-data-sources
Nov 10, 2024
Merged

Support more data sources#22
philippjfr merged 51 commits into
panel-extensions:mainfrom
MarcSkovMadsen:enhancement/more-data-sources

Conversation

@MarcSkovMadsen

@MarcSkovMadsen MarcSkovMadsen commented Oct 29, 2024

Copy link
Copy Markdown
Collaborator

Continues from #32. So review that one first.

Just wanted to get this started.

Feel free to contribute or run with it.

@@ -0,0 +1,72 @@
from typing import TYPE_CHECKING, Any, Union

@MarcSkovMadsen MarcSkovMadsen Nov 9, 2024

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one of the key changes. Adding support for more general Tabulator data than pandas DataFrame via Narwhals.

return [_infer_prop(data[col], i) for i, col in enumerate(data.columns)]


@nw.narwhalify

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I also used narwhals. Could be performance optimized. But I spent quite a lot of time just getting it working.

@MarcSkovMadsen
MarcSkovMadsen marked this pull request as ready for review November 9, 2024 13:48
@MarcSkovMadsen

Copy link
Copy Markdown
Collaborator Author

This one is ready for review.

I will create a new branch from this one. Trying to get duckdb relation and pygwalker Connector working.

@MarcSkovMadsen

Copy link
Copy Markdown
Collaborator Author

There are some issues on current main branch when testing pycafe. will fix in this one also.

@MarcSkovMadsen MarcSkovMadsen changed the title Support more data sources Philipp: Support more data sources [Ready for Review] Nov 9, 2024
@MarcSkovMadsen

Copy link
Copy Markdown
Collaborator Author

Ok. I fixed the issues except #36.

@MarcSkovMadsen MarcSkovMadsen changed the title Philipp: Support more data sources [Ready for Review] Support more data sources Nov 10, 2024
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Protocol

import pandas as pd
from sqlalchemy import create_engine, text

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should be imported at the top-level if it can be avoided.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree

@philippjfr philippjfr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly happy with this but I don't think sqlalchemy should be a core dependency.

@philippjfr

Copy link
Copy Markdown
Collaborator

Ignore me, I see it's a pygwalker dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants