tegmentum
Can't filter rows where column A value is nil
Using Explorer, I have a df where rows have id, size columns. the df has multiple entries for 1 id, but sometimes has a nil in the size column.
I’m trying to grab all the ids that have at least 1 nil value in the size column, to later exclude them from my df.
I try this:
ids_to_exclude =
df
|> DataFrame.filter(size == nil)
But get the following error:
** (ArgumentError) cannot invoke Explorer.Series.equal/2 with mismatched dtypes: :string and nil
(explorer 0.8.1) lib/explorer/series.ex:6274: Explorer.Series.dtype_mismatch_error/3
#cell:jtyrwno7aej2bj3n:3: (file)
#cell:jtyrwno7aej2bj3n:3: (file)
I can’t figure out what’s the correct/expected approach to handling this without doing this in plain elixir.
Any help would be much appreciated!
Thanks ![]()
First Post!
hugobarauna
Livebook Core Team
You can do something like:
ids_to_exclude =
df
|> DataFrame.filter(is_nil(size))
|> then(fn df -> df["id"] end)
Popular in Questions
Background
Let’s assume I have a typical GenServer that receives messages as requests, does some operation in a DB and returns responses....
New
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
I have followed this StackOverflow post to install the specific version of Erlang.
And When I am running mix ecto.setup then getting fol...
New
Hi,
is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
Hello,
I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these
buyer = %{
id: ...
New
Hey,
I have a NanoPi-M3 and try to install Elixir on their Ubuntu image. I followed the Raspberry Pi installation instructions from the ...
New
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
Hi guys, i’m new in the Elixir world, and i have to say, that i love it!
i’m having some problem to understand anonymous functions with ...
New
Other popular topics
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
Phoenix 1.4.0 released
Phoenix 1.4 is out! This release ships with exciting new features, most notably
with HTTP2 support, improved deve...
New
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
Good day to you all.
I have been struggling to get a query involving like and ilike to work.
Can anyone assist me on this, please?
pro...
New
I would like to know what is the best IDE for elixir development?
New
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
What is most correct way to open, read and parse JSON file with poison?
For example if we have example.json file in root of some projec...
New
Hey all,
I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
Hello guys,
I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New







