Skip to content

Commit bd4df41

Browse files
datapythonistaproost
authored andcommitted
WEB: Adding new pandas website (pandas-dev#28014)
1 parent 7e26a93 commit bd4df41

30 files changed

+1953
-2
lines changed

ci/code_checks.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
188188
set -o pipefail
189189
if [[ "$AZURE" == "true" ]]; then
190190
# we exclude all c/cpp files as the c/cpp files of pandas code base are tested when Linting .c and .h files
191-
! grep -n '--exclude=*.'{svg,c,cpp,html} --exclude-dir=env -RI "\s$" * | awk -F ":" '{print "##vso[task.logissue type=error;sourcepath=" $1 ";linenumber=" $2 ";] Tailing whitespaces found: " $3}'
191+
! grep -n '--exclude=*.'{svg,c,cpp,html,js} --exclude-dir=env -RI "\s$" * | awk -F ":" '{print "##vso[task.logissue type=error;sourcepath=" $1 ";linenumber=" $2 ";] Tailing whitespaces found: " $3}'
192192
else
193-
! grep -n '--exclude=*.'{svg,c,cpp,html} --exclude-dir=env -RI "\s$" * | awk -F ":" '{print $1 ":" $2 ":Tailing whitespaces found: " $3}'
193+
! grep -n '--exclude=*.'{svg,c,cpp,html,js} --exclude-dir=env -RI "\s$" * | awk -F ":" '{print $1 ":" $2 ":Tailing whitespaces found: " $3}'
194194
fi
195195
RET=$(($RET + $?)) ; echo $MSG "DONE"
196196
fi

environment.yml

+6
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ dependencies:
3636
- nbsphinx
3737
- pandoc
3838

39+
# web (jinja2 is also needed, but it's also an optional pandas dependency)
40+
- markdown
41+
- feedparser
42+
- pyyaml
43+
- requests
44+
3945
# testing
4046
- boto3
4147
- botocore>=1.11

requirements-dev.txt

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ numpydoc>=0.9.0
1717
nbconvert>=5.4.1
1818
nbsphinx
1919
pandoc
20+
markdown
21+
feedparser
22+
pyyaml
23+
requests
2024
boto3
2125
botocore>=1.11
2226
hypothesis>=3.82

web/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Directory containing the pandas website (hosted at https://pandas.io).
2+
3+
The website sources are in `web/pandas/`, which also include a `config.yml` file
4+
containing the settings to build the website. The website is generated with the
5+
command `./pandas_web.py pandas`. See `./pandas_web.py --help` and the header of
6+
the script for more information and options.
7+
8+
After building the website, to navigate it, it is needed to access the web using
9+
an http server (a not open the local files with the browser, since the links and
10+
the image sources are absolute to where they are served from). The easiest way
11+
to run an http server locally is to run `python -m http.server` from the
12+
`web/build/` directory.

web/pandas/_templates/layout.html

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<script type="text/javascript">
5+
var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-27880019-2']); _gaq.push(['_trackPageview']);
6+
(function() {
7+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
8+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
9+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
10+
})();
11+
</script>
12+
<title>pandas - Python Data Analysis Library</title>
13+
<meta charset="utf-8">
14+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
15+
<link rel="stylesheet"
16+
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
17+
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
18+
crossorigin="anonymous">
19+
{% for stylesheet in static.css %}
20+
<link rel="stylesheet"
21+
href="{{ base_url }}{{ stylesheet }}">
22+
{% endfor %}
23+
</head>
24+
<body>
25+
<header>
26+
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
27+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#nav-content" aria-controls="nav-content" aria-expanded="false" aria-label="Toggle navigation">
28+
<span class="navbar-toggler-icon"></span>
29+
</button>
30+
31+
{% if static.logo %}<a class="navbar-brand" href="{{ base_url }}/"><img alt="" src="{{ base_url }}{{ static.logo }}"/></a>{% endif %}
32+
33+
<div class="collapse navbar-collapse" id="nav-content">
34+
<ul class="navbar-nav">
35+
{% for item in navbar %}
36+
{% if not item.has_subitems %}
37+
<li class="nav-item">
38+
<a class="nav-link" href="{% if not item.target.startswith("http") %}{{ base_url }}{% endif %}{{ item.target }}">{{ item.name }}</a>
39+
</li>
40+
{% else %}
41+
<li class="nav-item dropdown">
42+
<a class="nav-link dropdown-toggle"
43+
data-toggle="dropdown"
44+
id="{{ item.slug }}"
45+
href="#"
46+
role="button"
47+
aria-haspopup="true"
48+
aria-expanded="false">{{ item.name }}</a>
49+
<div class="dropdown-menu" aria-labelledby="{{ item.slug }}">
50+
{% for subitem in item.target %}
51+
<a class="dropdown-item" href="{% if not subitem.target.startswith("http") %}{{ base_url }}{% endif %}{{ subitem.target }}">{{ subitem.name }}</a>
52+
{% endfor %}
53+
</div>
54+
</li>
55+
{% endif %}
56+
{% endfor %}
57+
</ul>
58+
</div>
59+
</nav>
60+
</header>
61+
<main role="main">
62+
<div class="container">
63+
{% block body %}{% endblock %}
64+
</div>
65+
</main>
66+
<footer class="container pt-4 pt-md-5 border-top">
67+
<p class="float-right">
68+
<a href="#">Back to top</a>
69+
</p>
70+
<p>
71+
© 2009 - 2019, pandas team
72+
</p>
73+
</footer>
74+
75+
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
76+
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
77+
crossorigin="anonymous"></script>
78+
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
79+
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
80+
crossorigin="anonymous"></script>
81+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
82+
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
83+
crossorigin="anonymous"></script>
84+
</body>
85+
</html>

web/pandas/blog.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% extends "layout.html" %}
2+
3+
{% block body %}
4+
{% for post in blog.posts %}
5+
<div class="card">
6+
<div class="card-body">
7+
<h3 class="card-title"><a href="{{post.link }}" target="_blank">{{ post.title }}</a></h3>
8+
<h6 class="card-subtitle">Source: {{ post.feed }} | Author: {{ post.author }} | Published: {{ post.published.strftime("%b %d, %Y") }}</h6>
9+
<div class="card-text">{{ post.summary }}</div>
10+
<a class="card-link" href="{{post.link }}" target="_blank">Read</a>
11+
</div>
12+
</div>
13+
{% endfor %}
14+
{% endblock %}

web/pandas/community/about.md

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# About pandas
2+
3+
## History of development
4+
5+
In 2008, _pandas_ development began at [AQR Capital Management](http://www.aqr.com).
6+
By the end of 2009 it had been [open sourced](http://en.wikipedia.org/wiki/Open_source),
7+
and is actively supported today by a community of like-minded individuals around the world who
8+
contribute their valuable time and energy to help make open source _pandas_
9+
possible. Thank you to [all of our contributors](team.html).
10+
11+
Since 2015, _pandas_ is a [NumFOCUS sponsored project](https://numfocus.org/sponsored-projects).
12+
This will help ensure the success of development of _pandas_ as a world-class open-source project.
13+
14+
### Timeline
15+
16+
- **2008**: Development of _pandas_ started
17+
- **2009**: _pandas_ becomes open source
18+
- **2012**: First edition of _Python for Data Analysis_ is published
19+
- **2015**: _pandas_ becomes a [NumFOCUS sponsored project](https://numfocus.org/sponsored-projects)
20+
- **2018**: First in-person core developer sprint
21+
22+
## Library Highlights
23+
24+
- A fast and efficient **DataFrame** object for data manipulation with
25+
integrated indexing;
26+
27+
- Tools for **reading and writing data** between in-memory data structures and
28+
different formats: CSV and text files, Microsoft Excel, SQL databases, and
29+
the fast HDF5 format;
30+
31+
- Intelligent **data alignment** and integrated handling of **missing data**:
32+
gain automatic label-based alignment in computations and easily manipulate
33+
messy data into an orderly form;
34+
35+
- Flexible **reshaping** and pivoting of data sets;
36+
37+
- Intelligent label-based **slicing**, **fancy indexing**, and **subsetting**
38+
of large data sets;
39+
40+
- Columns can be inserted and deleted from data structures for **size
41+
mutability**;
42+
43+
- Aggregating or transforming data with a powerful **group by** engine
44+
allowing split-apply-combine operations on data sets;
45+
46+
- High performance **merging and joining** of data sets;
47+
48+
- **Hierarchical axis indexing** provides an intuitive way of working with
49+
high-dimensional data in a lower-dimensional data structure;
50+
51+
- **Time series**-functionality: date range generation and frequency
52+
conversion, moving window statistics, moving window linear regressions, date
53+
shifting and lagging. Even create domain-specific time offsets and join time
54+
series without losing data;
55+
56+
- Highly **optimized for performance**, with critical code paths written in
57+
[Cython](http://www.cython.org/) or C.
58+
59+
- Python with *pandas* is in use in a wide variety of **academic and
60+
commercial** domains, including Finance, Neuroscience, Economics,
61+
Statistics, Advertising, Web Analytics, and more.
62+
63+
## Mission
64+
65+
_pandas_ aims to be the fundamental high-level building block for doing practical,
66+
real world data analysis in Python.
67+
Additionally, it has the broader goal of becoming the most powerful and flexible
68+
open source data analysis / manipulation tool available in any language.
69+
70+
## Vision
71+
72+
A world where data analytics and manipulation software is:
73+
74+
- Accessible to everyone
75+
- Free for users to use and modify
76+
- Flexible
77+
- Powerful
78+
- Easy to use
79+
- Fast
80+
81+
## Values
82+
83+
Is in the core of _pandas_ to be respectful and welcoming with everybody,
84+
users, contributors and the broader community. Regardless of level of experience,
85+
gender, gender identity and expression, sexual orientation, disability,
86+
personal appearance, body size, race, ethnicity, age, religion, or nationality.

web/pandas/community/citing.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Citing pandas
2+
3+
## Citing
4+
5+
If you use _pandas_ for a scientific publication, we would appreciate citations to one of the following papers:
6+
7+
- [Data structures for statistical computing in python](http://conference.scipy.org/proceedings/scipy2010/pdfs/mckinney.pdf),
8+
McKinney, Proceedings of the 9th Python in Science Conference, Volume 445, 2010.
9+
10+
@inproceedings{mckinney2010data,
11+
title={Data structures for statistical computing in python},
12+
author={Wes McKinney},
13+
booktitle={Proceedings of the 9th Python in Science Conference},
14+
volume={445},
15+
pages={51--56},
16+
year={2010},
17+
organization={Austin, TX}
18+
}
19+
20+
21+
- [pandas: a foundational Python library for data analysis and statistics](https://www.scribd.com/document/71048089/pandas-a-Foundational-Python-Library-for-Data-Analysis-and-Statistics),
22+
McKinney, Python for High Performance and Scientific Computing, Volume 14, 2011.
23+
24+
@article{mckinney2011pandas,
25+
title={pandas: a foundational Python library for data analysis and statistics},
26+
author={Wes McKinney},
27+
journal={Python for High Performance and Scientific Computing},
28+
volume={14},
29+
year={2011}
30+
}
31+
32+
## Brand and logo
33+
34+
When using the project name _pandas_, please use it in lower case, even at the beginning of a sentence.
35+
36+
The official logo of _pandas_ is:
37+
38+
![]({{ base_url }}/static/img/pandas.svg)
39+
40+
You can download a `svg` version of the logo [here]({{ base_url }}/static/img/pandas.svg).
41+
42+
When using the logo, please follow the next directives:
43+
44+
- Leave enough margin around the logo
45+
- Do not distort the logo by changing its proportions
46+
- Do not place text or other elements on top of the logo

web/pandas/community/coc.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, and in the interest of
4+
fostering an open and welcoming community, we pledge to respect all people who
5+
contribute through reporting issues, posting feature requests, updating
6+
documentation, submitting pull requests or patches, and other activities.
7+
8+
We are committed to making participation in this project a harassment-free
9+
experience for everyone, regardless of level of experience, gender, gender
10+
identity and expression, sexual orientation, disability, personal appearance,
11+
body size, race, ethnicity, age, religion, or nationality.
12+
13+
Examples of unacceptable behavior by participants include:
14+
15+
* The use of sexualized language or imagery
16+
* Personal attacks
17+
* Trolling or insulting/derogatory comments
18+
* Public or private harassment
19+
* Publishing other's private information, such as physical or electronic
20+
addresses, without explicit permission
21+
* Other unethical or unprofessional conduct
22+
23+
Project maintainers have the right and responsibility to remove, edit, or
24+
reject comments, commits, code, wiki edits, issues, and other contributions
25+
that are not aligned to this Code of Conduct, or to ban temporarily or
26+
permanently any contributor for other behaviors that they deem inappropriate,
27+
threatening, offensive, or harmful.
28+
29+
By adopting this Code of Conduct, project maintainers commit themselves to
30+
fairly and consistently applying these principles to every aspect of managing
31+
this project. Project maintainers who do not follow or enforce the Code of
32+
Conduct may be permanently removed from the project team.
33+
34+
This Code of Conduct applies both within project spaces and in public spaces
35+
when an individual is representing the project or its community.
36+
37+
A working group of community members is committed to promptly addressing any
38+
reported issues. The working group is made up of pandas contributors and users.
39+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
40+
reported by contacting the working group by e-mail ([email protected]).
41+
Messages sent to this e-mail address will not be publicly visible but only to
42+
the working group members. The working group currently includes
43+
44+
<ul>
45+
{% for person in maintainers.coc %}
46+
<li>{{ person }}</li>
47+
{% endfor %}
48+
</ul>
49+
50+
All complaints will be reviewed and investigated and will result in a response
51+
that is deemed necessary and appropriate to the circumstances. Maintainers are
52+
obligated to maintain confidentiality with regard to the reporter of an
53+
incident.
54+
55+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
56+
version 1.3.0, available at
57+
[http://contributor-covenant.org/version/1/3/0/][version],
58+
and the [Swift Code of Conduct][swift].
59+
60+
[homepage]: http://contributor-covenant.org
61+
[version]: http://contributor-covenant.org/version/1/3/0/
62+
[swift]: https://swift.org/community/#code-of-conduct
63+

0 commit comments

Comments
 (0)