sehHeiden
Compared to Pythons pandas I am missing some functions for DataFrames and Series from Explorer, or I have to apply a workaround, which makes everything less expressive.
DataFrames have a drop_nil function. Why don’t have Series have it? Well, I can convert it to list, drop them from the list and then convert back…
By the documentation the series have a contains function, that use a regex, could not get with working with a compiled regex string. I did a mapping instead:
filter = df["content"]
|> S.to_list()
|> Enum.map(&Regex.match?(tags,&1))
|> S.from_list()
This returns a series of boolean. But I can not use it filter a DataFrame or a Series? At least I did not find it in the reference and also no way around. It neighter a filter, filter_with nor a slice. Slice needs indices. How do I get the indices, where the value is :true?
The last question is, about Date(time) columns. How can I convert a Date to a calendar week?
Update:
post_filter = df["content"]
|> S.downcase()
|> S.to_list()
|> Enum.map(&Regex.match?(tags,&1))
|> Enum.with_index()
|> Enum.filter(&(elem(&1, 0) == true))
|> Enum.map(&(elem(&1, 1)))
Can be used as input for the slicing…
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










First Post!- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
billylanchantin
I believe you want
Explorer.Series.mask/2.Most Liked
billylanchantin
Hi @sehHeiden,
The function is now on
main(José reviews PRs quick!):So if you get the latest ref, you can now do:
Since you’re new to Elixir, you can get the latest ref by adding the following to your project’s
mix.exs:There are other ways of doing this too, but that should get you started.
josevalim
We will also gladly accept PRs that add missing functions. We know that we are missing many of them.
sehHeiden
Sorry for answering late. The messages from the elixir-forum always end up in my spam filter. About the PR… a) a I very new to Elixir not so bold to mess up some core libraries
. Also barely have to time.
But creating an issue is doable.
Last Post!
josevalim
The explorer internal library in Rust is always 0.1 but that’s not a concern.
It is always internal and never published.