diff --git a/web/pandas/_templates/layout.html b/web/pandas/_templates/layout.html index 3cad22bf938b0..dc91a2932e7e4 100644 --- a/web/pandas/_templates/layout.html +++ b/web/pandas/_templates/layout.html @@ -12,7 +12,7 @@ pandas - Python Data Analysis Library - + - {% if static.logo %}{% endif %} + {% if static.logo %}{% endif %} diff --git a/web/pandas/getting_started.md b/web/pandas/getting_started.md index cbcc3a35eb44f..cb14e52edad2c 100644 --- a/web/pandas/getting_started.md +++ b/web/pandas/getting_started.md @@ -4,7 +4,7 @@ The next steps provides the easiest and recommended way to set up your environment to use pandas. Other installation options can be found in -the [advanced installation page]({{ base_url}}/docs/getting_started/install.html). +the [advanced installation page]({{ base_url}}docs/getting_started/install.html). 1. Download [Anaconda](https://www.anaconda.com/distribution/) for your operating system and the latest Python version, run the installer, and follow the steps. Please note: @@ -32,7 +32,7 @@ the [advanced installation page]({{ base_url}}/docs/getting_started/install.html ## Tutorials -You can learn more about pandas in the [tutorials]({{ base_url }}/docs/getting_started/intro_tutorials/), +You can learn more about pandas in the [tutorials]({{ base_url }}docs/getting_started/intro_tutorials/), and more about JupyterLab in the [JupyterLab documentation](https://jupyterlab.readthedocs.io/en/stable/user/interface.html). @@ -42,7 +42,7 @@ The book we recommend to learn pandas is [Python for Data Analysis](https://amzn by [Wes McKinney](https://wesmckinney.com/), creator of pandas. - Python for Data Analysis + Python for Data Analysis ## Videos diff --git a/web/pandas/index.html b/web/pandas/index.html index ce1e1e1a8f561..61f62e9472859 100644 --- a/web/pandas/index.html +++ b/web/pandas/index.html @@ -10,7 +10,7 @@

pandas

built on top of the Python programming language.

- Install pandas now! + Install pandas now!

@@ -19,25 +19,25 @@

pandas

Getting started
Documentation
Community
@@ -56,16 +56,16 @@
With the support of:
{% endfor %} {% endfor %} -

The full list of companies supporting pandas is available in the sponsors page. +

The full list of companies supporting pandas is available in the sponsors page.

{% if releases %}

Latest version: {{ releases[0].name }}

{% endif %} @@ -88,7 +88,7 @@

Follow us

Get the book

- Python for Data Analysis + Python for Data Analysis

{% if releases[1:5] %} diff --git a/web/pandas/try.md b/web/pandas/try.md deleted file mode 100644 index 20e119759df6f..0000000000000 --- a/web/pandas/try.md +++ /dev/null @@ -1,21 +0,0 @@ -# Try pandas online - -
-
-import pandas
-fibonacci = pandas.Series([1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144])
-fibonacci.sum()
-    
- - -
- -## Interactive tutorials - -You can also try _pandas_ on [Binder](https://mybinder.org/) for one of the next topics: - -- Exploratory analysis of US presidents -- Preprocessing the Titanic dataset to train a machine learning model -- Forecasting the stock market - -_(links will be added soon)_ diff --git a/web/pandas_web.py b/web/pandas_web.py index 8c508a15f9a2b..e4ffa2cde7cc9 100755 --- a/web/pandas_web.py +++ b/web/pandas_web.py @@ -278,7 +278,7 @@ def roadmap_pdeps(context): context["pdeps"][status].append( { "title": title, - "url": f"/pdeps/{html_file}", + "url": f"pdeps/{html_file}", } ) @@ -383,7 +383,6 @@ def extend_base_template(content: str, base_template: str) -> str: def main( source_path: str, target_path: str, - base_url: str, ) -> int: """ Copy every file in the source directory to the target directory. @@ -397,7 +396,7 @@ def main( os.makedirs(target_path, exist_ok=True) sys.stderr.write("Generating context...\n") - context = get_context(config_fname, base_url=base_url, target_path=target_path) + context = get_context(config_fname, target_path=target_path) sys.stderr.write("Context generated\n") templates_path = os.path.join(source_path, context["main"]["templates_path"]) @@ -420,6 +419,7 @@ def main( content, extensions=context["main"]["markdown_extensions"] ) content = extend_base_template(body, context["main"]["base_template"]) + context["base_url"] = "".join(["../"] * os.path.normpath(fname).count("/")) content = jinja_env.from_string(content).render(**context) fname = os.path.splitext(fname)[0] + ".html" with open(os.path.join(target_path, fname), "w") as f: @@ -438,8 +438,5 @@ def main( parser.add_argument( "--target-path", default="build", help="directory where to write the output" ) - parser.add_argument( - "--base-url", default="", help="base url where the website is served from" - ) args = parser.parse_args() - sys.exit(main(args.source_path, args.target_path, args.base_url)) + sys.exit(main(args.source_path, args.target_path))