Github user HyukjinKwon commented on the issue: https://github.com/apache/spark/pull/15053 Hi @mortada , I am sorry that I am a bit being noisy here but I just took a look for myself. I resembled the PySpark structure and made a draft for myself. ```python """ >>> print df [1, 2, 3] >>> print df2 [] """ import doctest import sys def my_function(a, b): """ >>> my_function(df[0], df[1]) 2 """ return a * b if __name__ == "__main__": globs = globals() globs['df'] = [1, 2, 3] globs['df2'] = [] doctest.testmod(sys.modules[__name__], globs=globs) ``` If we do this, we would be able to just add ``` """ >>> print df [1, 2, 3] >>> print df2 [] """ ``` on the top as a docstring and remove all the duplicated dataframe definitions in each doc string. I guess this will be a minimal change and also satisfy your demands here with making the docstring clear.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org