Skip to content
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

add slice for frame. #445

Merged
merged 2 commits into from
Oct 21, 2018
Merged

add slice for frame. #445

merged 2 commits into from
Oct 21, 2018

Conversation

alexpantyukhin
Copy link
Contributor

@alexpantyukhin alexpantyukhin force-pushed the add_slice branch 2 times, most recently from f1f431f to 9a7d544 Compare October 20, 2018 10:54
@alexpantyukhin
Copy link
Contributor Author

@zyzhu What about this PR? should we merge it or close?

@zyzhu
Copy link
Contributor

zyzhu commented Oct 21, 2018

@alexpantyukhin Sorry that I didn't have too much time to spare on Deedle after summer.

Frame.slice will be handy, though it is more like loc in pandas instead of iloc by indexing with numbers.

I'll merge it and fix the documentation test timeout on Travis later. Thanks!

@zyzhu zyzhu merged commit 06a63ef into fslaborg:master Oct 21, 2018
@alexpantyukhin alexpantyukhin deleted the add_slice branch October 21, 2018 06:31
@dsyme
Copy link
Member

dsyme commented Oct 23, 2018

@zyzhu You are doing a great job, thank you! :)

@alexpantyukhin Would you like to consider being co-maintainer too? Having two active maintainers is great if possible

@alexpantyukhin
Copy link
Contributor Author

@dsyme I don't mind :) It would be great :)

@dsyme
Copy link
Member

dsyme commented Oct 25, 2018

@alexpantyukhin You are now a co-admin

@dsyme
Copy link
Member

dsyme commented Oct 25, 2018

@alexpantyukhin You don't yet have permission to publish the nuget packages but @zyzhu can do that, and we can give you permission if needed

@alexpantyukhin
Copy link
Contributor Author

Thanks! I appreciate this.

@zyzhu
Copy link
Contributor

zyzhu commented Oct 25, 2018

@alexpantyukhin That's great! Thanks for all the contributions and more in the future!

@liugaocn
Copy link

liugaocn commented Jan 26, 2020

But somehow, I don't see a slice option in C#. Is that only available in F#?

@zyzhu
Copy link
Contributor

zyzhu commented Jan 26, 2020

@liugaocn The F# functions are not all exposed to C# yet. They are written in SeriesExtension.fs and FrameExtension.fs. Like the following https://github.com/fslaborg/Deedle/blob/master/src/Deedle/FrameExtensions.fs#L1164

I will find some time to add them one by one in another pull.

By the way, it is very easy to write extension functions. You may send a pull request if you are interested. Thanks in advance.

@Hulkstance
Copy link

Are they available in C# right now?

@zyzhu
Copy link
Contributor

zyzhu commented Feb 20, 2021

Sorry that I just looked into this. As I do not write C# often, I'm not too familiar with Deedle's functions exposed in C#.

I noticed that the following C# code is equivalent to calling slicing rows and columns in F#

var actual = df.Rows[new int[] { 0, 1, 2, 3, 4 }];
var actual = df.Columns[new string[] { "Open", "High" }];

I've added the above two cases in the C# test project. 71e7594

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.

5 participants