title: Is it possible to read source code from the pandas library and use that in my own functions?
body: <p><strong>Background</strong>:</p>
  
  <p>I'd like to slice a pandas dataframe in elements of a given row length, and perform calculations on them.</p>
  
  <p><a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.rolling.html" rel="nofollow noreferrer">pandas.DataFrame.rolling</a> will let me do that, but seemingly only with built-in functions like <code>sum()</code> in the example <code>df.rolling(2, win_type='triang').sum()</code>. I would also like to plot these subsets (I'm able to do that by slicing and some For Loops, but it's a bit slow).</p>
  
  <p><strong>What I've found out:</strong></p>
  
  <p>From <a href="https://stackoverflow.com/questions/427453/how-can-i-get-the-source-code-of-a-python-function">How can I get the source code of a Python function?</a> I've learnt that I can read source code using <code>pandas.DataFrame.rolling??</code> which will give me this:</p>
  
  <p><a href="https://i.stack.imgur.com/oGOYz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oGOYz.png" alt="enter image description here"></a></p>
  
  <p>But trying to dig deeper from here using for example <code>rolling??</code> seems futile:</p>
  
  <p><a href="https://i.stack.imgur.com/BdlEt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BdlEt.png" alt="enter image description here"></a></p>
  
  <p>So, is it possible to reference the underlying functions of <code>pandas.DataFrame.rolling</code> somehow, or is this where it ends using Python? I guess so since the <a href="https://pandas.pydata.org/" rel="nofollow noreferrer">docs</a> state that pandas is written in Cython or C, but I'm really curious about this so I'd like to ask about this here as well.</p>
  
  <p>Thank you for any suggestions!</p>