Looking to plot a histogram emanating from a dataframe, I seem to lack in transforming to a right object type that matplotlib can deal with. Here are some failed attempts. How do I fix it up?
And more generally, how do you typically salvage something like that?
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
filter(lambda v: v > 0, df['foo_col']).hist(bins=10)
---> 10 filter(lambda v: v > 0, df['foo_col']).hist(bins=100) AttributeError: 'filter' object has no attribute 'hist'
hist(filter(lambda v: v > 0, df['foo_col']), bins=100)
---> 10 hist(filter(lambda v: v > 0, df['foo_col']), bins=100) TypeError: 'Series' object is not callable
> 0?