You could use the 'percentile_between' filter. (See documentation under factors https://www.quantopian.com/help#quantopian_pipeline_factors_Factor )
# Create a filter to get tradeable stocks (excludes etfs etc)
tradeable_stocks = QTradableStocksUS()
# Create a factor to get the latest market cap. Limit to tradeable stocks with a mask.
mkt_cap = MarketCap(mask = tradeable_stocks)
# Create a filter to select mid cap stocks
# Note that this is a percentage and not a fixed value (eg $250M)
# Let's use the Morningstar definition of 'mid cap' which is stocks that fall
# between 70th and 90th percentile in market capitalization of the investable universe
# see http://www.morningstar.com/InvGlossary/morningstar-mid-cap-index.aspx
mid_cap = mkt_cap.percentile_between(70, 90, mask = tradeable_stocks)
# Now simply use that filter as a screen
initial_screen = mid_cap
See the attached notebook with this in action. It also shows the range of market caps being filtered to validate it falls within expectations.
Good luck.