Python lambda function to return row numbers that are in a Fibonacci Sequence
On LinkedIn, I often see people posting pandas code snippets for various things. This week I was looking at a post about using .iloc()
to return certain rows by row number.
This got me wondering whether it was possible to return row numbers that happen to be in a Fibonacci Sequence; using lambda expressions. Turns out this is possible. Hopefully not one to turn up during an interview whiteboarding session though!
Further Reading Wikipedia - Fibonacci sequence
Enjoy Reading This Article?
Here are some more articles you might like to read next: