Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
1330eaa9
Kaydet (Commit)
1330eaa9
authored
Kas 22, 2016
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge
üst
e205f8b2
6da90781
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
29 deletions
+25
-29
statistics.rst
Doc/library/statistics.rst
+5
-5
datastructures.rst
Doc/tutorial/datastructures.rst
+20
-24
No files found.
Doc/library/statistics.rst
Dosyayı görüntüle @
1330eaa9
...
...
@@ -69,8 +69,7 @@ However, for reading convenience, most of the examples show sorted sequences.
.. function:: mean(data)
Return the sample arithmetic mean of *data*, a sequence or iterator of
real-valued numbers.
Return the sample arithmetic mean of *data* which can be a sequence or iterator.
The arithmetic mean is the sum of the data divided by the number of data
points. It is commonly called "the average", although it is only one of many
...
...
@@ -148,6 +147,7 @@ However, for reading convenience, most of the examples show sorted sequences.
Return the median (middle value) of numeric data, using the common "mean of
middle two" method. If *data* is empty, :exc:`StatisticsError` is raised.
*data* can be a sequence or iterator.
The median is a robust measure of central location, and is less affected by
the presence of outliers in your data. When the number of data points is
...
...
@@ -175,7 +175,7 @@ However, for reading convenience, most of the examples show sorted sequences.
.. function:: median_low(data)
Return the low median of numeric data. If *data* is empty,
:exc:`StatisticsError` is raised.
:exc:`StatisticsError` is raised.
*data* can be a sequence or iterator.
The low median is always a member of the data set. When the number of data
points is odd, the middle value is returned. When it is even, the smaller of
...
...
@@ -195,7 +195,7 @@ However, for reading convenience, most of the examples show sorted sequences.
.. function:: median_high(data)
Return the high median of data. If *data* is empty, :exc:`StatisticsError`
is raised.
is raised.
*data* can be a sequence or iterator.
The high median is always a member of the data set. When the number of data
points is odd, the middle value is returned. When it is even, the larger of
...
...
@@ -216,7 +216,7 @@ However, for reading convenience, most of the examples show sorted sequences.
Return the median of grouped continuous data, calculated as the 50th
percentile, using interpolation. If *data* is empty, :exc:`StatisticsError`
is raised.
is raised.
*data* can be a sequence or iterator.
.. doctest::
...
...
Doc/tutorial/datastructures.rst
Dosyayı görüntüle @
1330eaa9
...
...
@@ -99,30 +99,26 @@ objects:
An example that uses most of the list methods::
>>> a = [66.25, 333, 333, 1, 1234.5]
>>> print(a.count(333), a.count(66.25), a.count('x'))
2 1 0
>>> a.insert(2, -1)
>>> a.append(333)
>>> a
[66.25, 333, -1, 333, 1, 1234.5, 333]
>>> a.index(333)
1
>>> a.index(333, 2) # search for 333 starting at index 2
2
>>> a.remove(333)
>>> a
[66.25, -1, 333, 1, 1234.5, 333]
>>> a.reverse()
>>> a
[333, 1234.5, 1, 333, -1, 66.25]
>>> a.sort()
>>> a
[-1, 1, 66.25, 333, 333, 1234.5]
>>> a.pop()
1234.5
>>> a
[-1, 1, 66.25, 333, 333]
>>> fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', 'banana']
>>> fruits.count('apple')
2
>>> fruits.count('tangerine')
0
>>> fruits.index('banana')
3
>>> fruits.index('banana', 4) # Find next banana starting a position 4
6
>>> fruits.reverse()
>>> fruits
['banana', 'apple', 'kiwi', 'banana', 'pear', 'apple', 'orange']
>>> fruits.append('grape')
>>> fruits
['banana', 'apple', 'kiwi', 'banana', 'pear', 'apple', 'orange', 'grape']
>>> fruits.sort()
>>> fruits
['apple', 'apple', 'banana', 'banana', 'grape', 'kiwi', 'orange', 'pear']
>>> fruits.pop()
'pear'
You might have noticed that methods like ``insert``, ``remove`` or ``sort`` that
only modify the list have no return value printed -- they return the default
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment