<jupyter_start><jupyter_text>The Pandas SeriesPandas provides a `Series` object that is very similar to a numpy array, but with some additional functionality. In this lesson, we will learn about pandas Series and how to work with them.  OverviewA pandas Series object is a one-dimensional, labeled array made up of an autogenerated index that starts at 0 and data of a single data type.A couple of important things to note about a Series:- If I try to make a pandas Series using multiple data types like `int` and `string` values, the data will be converted to the same `object` data type; the `int` values will lose their `int` functionality. - A pandas Series can be created in several ways; we will look at a few of these ways below. However, **it will most often be created by selecting a single column from a pandas Dataframe in which case the Series retains the same index as the Dataframe.** We will dive into this in the next two lessons: DataFrames and Advanced DataFrames.<jupyter_code>import numpy as np
import pandas as pd

import matplotlib.pyplot as plt<jupyter_output><empty_output><jupyter_text>Convention is to import the `pandas` module with the alias `pd`.  Create a SeriesWe can use the pandas Series constructor function to create a Series: - from a Python list or a NumPy array.<jupyter_code>numbers_series = pd.Series([100, 43, 26, 17, 17])
type(numbers_series)
numbers_series<jupyter_output><empty_output><jupyter_text>Notice what happens when we create a Series containing different data types:<jupyter_code>pd.Series([ 4, 5, 4.5 ])
letters_series = pd.Series(['a', 'e', 'h', 'd', 'b', 'z'])
letters_series<jupyter_output><empty_output><jupyter_text>- from a Python dictionary.<jupyter_code>labeled_series = pd.Series({'a' : 0, 'b' : 1.5, 'c' : 2, 'd': 3.5, 'e': 4, 'f': 5.5})
labeled_series<jupyter_output><empty_output><jupyter_text>Vectorized OperationsLike numpy arrays, pandas series are vectorized by default, for example, we can easily use the basic arithmatic operators to manipulate every element in the series.<jupyter_code>randomlist = [1,2,3,4,5]
numbers_series 
numbers_series<jupyter_output><empty_output><jupyter_text>Comparison operators also work:<jupyter_code>numbers_series == 2
numbers_series > 17<jupyter_output><empty_output><jupyter_text>Series Attributes **Attributes** return useful information about a Series' properties; they don't perform operations or calculations with the Series. Attributes are easily accessible using dot notation like we will see in the examples below. *Jupyter Notebook allows you to quickly access a list of available attributes by pressing the tab key after the series name followed by a period or dot; this is called dot notation or attribute access.*There are several components that make up a pandas Series, and I can easliy access each component by using attributes.  `.index`- **The index** allows us to reference items in the series. In our numbers_series, the index consists of the numbers 0-3.<jupyter_code># Access the index of the Series using dot notation.

numbers_series.index<jupyter_output><empty_output><jupyter_text>`.values`- **The values** are my data.<jupyter_code># The values are stored in a NumPy array. Hello vectorized operations!

numbers_series.values<jupyter_output><empty_output><jupyter_text>`.dtype`- **The dtype** is the data type of the elements in the Series. In our numbers_series,  the data type is `int64`; it was inferred from the data we used.    Pandas has several main data types we will work with:    - int: integer, whole number values    - float: decimal numbers    - bool: true or false values    - object: strings    - category: a fixed and limited set of string values<jupyter_code>numbers_series.dtype<jupyter_output><empty_output><jupyter_text>`.name`- **The name** is an optional human-friendly name for the Series.Our Series doesn't have a name, but we can give it one:<jupyter_code>numbers_series.name = 'numbers_series'
numbers_series<jupyter_output><empty_output><jupyter_text>`.size`- The `.size` attribute returns an int representing the number of rows in the Series. *NULL values are included.*<jupyter_code>numbers_series.size
# Rows 0 - 4 = 5 rows<jupyter_output><empty_output><jupyter_text>`.shape`- The `.shape` attribute returns a tuple representing the rows and columns when used on a two-dimensional structure like a DataFrame, but it can also be used on a Series to return its number of rows. *NULL values are included.*<jupyter_code>numbers_series.shape<jupyter_output><empty_output><jupyter_text>Series Methods**Methods** used on pandas Series objects often return new Series objects; most also offer parameters with default settings designed to keep the user from mutating the original Series objects. (`inplace=False`)- If I want to save any manipulations or transformations I make on my Series, I can either assign the Series to a variable or adjust my parameters. Series have a number of useful methods that we can use for various sorts of manipulations and transformations; let's look at a few.  `.head`, `.tail`, `.sample`- The `.head(n)` method returns the first n rows in the Series; `n = 5` by default. This method returns a new Series with the same indexing as the original Series. - The `.tail(n)` method returns the last n rows in the Series; `n = 5` by default. Increase or decrease your value for n to return more or less than 5 rows.- The `.sample(n)` method returns a random sample of rows in the Series; `n = 1` by default. Again, the index is retained.<jupyter_code>numbers_series.head()
numbers_series.tail(2)
#Random sample of () size
numbers_series.sample(2)<jupyter_output><empty_output><jupyter_text>`.astype`We can convert the data types of the values in our Series with the `.astype` method.<jupyter_code>num_strings = pd.Series([3, 4, 5, 6]).astype('str')
num_strings
floats = pd.Series([3, 4, 5, 6]).astype('float')
floats|
floats.astype('int')<jupyter_output><empty_output><jupyter_text>`.value_counts`The `.value_counts()` method returns a new Series consisting of a labeled index representing the unique values from the original Series and values representing the frequency each unique value appears in the original Series. *It's like performing a SQL `GROUP BY` with a `COUNT`.*- This is an extremely useful method you will find yourself using often with Series containing object and category data types.<jupyter_code>pd.Series(['a', 'b', 'a', 'c', 'b', 'a', 'd', 'a']).value_counts()<jupyter_output><empty_output><jupyter_text>`.describe`The `.describe` method returns a Series of descriptive statistics on a pandas Series. The information it returns depends on the data type of the elements in the Series.<jupyter_code>numbers_series.describe()<jupyter_output><empty_output><jupyter_text>**More Descriptive Statistics Methods**Pandas has a number of methods that can be used to view summary statisticsabout our data. The table below ([taken fromhere](https://pandas.pydata.org/pandas-docs/stable/basics.htmldescriptive-statistics))provides a summary of some of the most commonly used methods.| Function   | Description                                ||----------  |-------------                               || `count`    | Number of non-NA observations              || `sum`      | Sum of values                              || `mean`     | Mean of values                             || `median`   | Arithmetic median of values                || `min`      | Minimum                                    || `max`      | Maximum                                    || `mode`     | Mode                                       || `abs`      | Absolute Value                             || `std`      | Bessel-corrected sample standard deviation || `quantile` | Sample quantile (value at %)               |<jupyter_code>{
    'count': numbers_series.count(),
    'sum': numbers_series.sum(),
    'mean': numbers_series.mean()
}<jupyter_output><empty_output><jupyter_text>`.nlargest`, `.nsmallest`These methods allow me to return the n largest or n smallest values from a pandas Series. *I can set the `keep` parameter to `first`, `last`, or `all` to deal with duplicate largest or smallest values; this is quite handy.*The default argument for keep is shown below.```pythonSeries.nlargest(n=5, keep='first')Series.nsmallest(n=5, keep='first')```<jupyter_code>numbers_series.nlargest(n=1)
# If I want to return all of the lowest values, not just the first instance.

numbers_series.nsmallest(n=1, keep='all')<jupyter_output><empty_output><jupyter_text>`.sort_values`, `.sort_index`These are handy methods that allow you to either sort your Series values or index respectively in ascending or descending order.- I can use the parameters for these methods to customize my sorts to meet my needs.<jupyter_code>letters_series.sort_values()
# The Series values retain their index from the original Series.

letters_series.sort_values(ascending = False)
# I can reset the index using this parameter if that meets my needs.

letters_series.sort_values(ignore_index=True)
# I can also sort by index values.

letters_series.sort_index(ascending=False)<jupyter_output><empty_output><jupyter_text>Exercises Part IMake a file named `pandas_series.py` or `pandas_series.ipynb` for the following exercises.Use pandas to create a Series named fruits from the following list:        ["kiwi", "mango", "strawberry", "pineapple", "gala apple", "honeycrisp apple", "tomato", "watermelon", "honeydew", "kiwi", "kiwi", "kiwi", "mango", "blueberry", "blackberry", "gooseberry", "papaya"]        Use Series attributes and methods to explore your fruits Series.<jupyter_code>fruits = ["kiwi", "mango", "strawberry", "pineapple", "gala apple", "honeycrisp apple", "tomato", "watermelon", "honeydew", "kiwi", "kiwi", "kiwi", "mango", "blueberry", "blackberry", "gooseberry", "papaya"]
fruits = pd.Series(fruits)
type(fruits)<jupyter_output><empty_output><jupyter_text>1. Determine the number of elements in fruits.<jupyter_code>fruits.size
fruits.shape<jupyter_output><empty_output><jupyter_text>2. Output only the index from fruits.<jupyter_code>fruits.index<jupyter_output><empty_output><jupyter_text>3. Output only the values from fruits.<jupyter_code>fruits.values<jupyter_output><empty_output><jupyter_text>4. Confirm the data type of the values in fruits.<jupyter_code>fruits.dtype<jupyter_output><empty_output><jupyter_text>5. Output only the first five values from fruits. Output the last three values. Output two random values from fruits.<jupyter_code>fruits.head(5)
fruits.tail(3)
fruits.sample(2)<jupyter_output><empty_output><jupyter_text>6. Run the `.describe()` on fruits to see what information it returns when called on a  Series with string values.<jupyter_code>fruits.describe()<jupyter_output><empty_output><jupyter_text>7. Run the code necessary to produce only the unique string values from fruits.<jupyter_code>fruits.unique()
fruits.value_counts().index<jupyter_output><empty_output><jupyter_text>8. Determine how many times each unique string value occurs in fruits.<jupyter_code>fruits.value_counts()<jupyter_output><empty_output><jupyter_text>9. Determine the string value that occurs most frequently in fruits.<jupyter_code>fruits.mode()
fruits.value_counts().nlargest(n=1, keep="all")
fruits.value_counts().head(1)<jupyter_output><empty_output><jupyter_text>10. Determine the string value that occurs least frequently in fruits.<jupyter_code>fruits.value_counts().nsmallest(n=1, keep= "all")<jupyter_output><empty_output><jupyter_text>___  Indexing and Subsetting- This is where the pandas index shines; we can select subsets of our data using index labels, index position, or boolean sequences (list, array, Series).- I can also pass a sequence of boolean values to the indexing operator, `[]`; that sequence could be a list or array, but it can also be another pandas Series **if the index of the boolean Series matches the original Series**.<jupyter_code>numbers_series
# I can see that my condition is being met by the values at index 0 and index 1.

bools = numbers_series > 40
bools
# I pass my boolean mask to the original Series to return the values that meet the condition.

numbers_series[bools]
# I can simply pass my conditional expression into the indexing operator, too.

numbers_series[numbers_series > 40]<jupyter_output><empty_output><jupyter_text>More Series Attributes  `.str`In addition to vectorized arithmetic operations, pandas also provides us with a way to vectorize string manipulation. Once we access the `.str` attribute, we can apply a string method to each string value in a Series. *Performing string manipulation like this does not mutate my original Series; I have to assign my manipulation to a variable if I want to keep it.*For example, we can call the `.lower` method, which will convert each string value in the string_series to lowercase.<jupyter_code>string_series = pd.Series(['Hello', 'CodeuP', 'StUDenTs'])
string_series
numbers_series.str.astype(str).str.replace('43','42')
string_series.str.lower()
string_series.str.replace('e', '_')
string_series
# Since each method returns a Series, I can use method chaining like this.

string_series.str.lower().str.replace('e', '_')
string_series.str.lower().str.startswith('h')
# I can even use method chaining and indexing!

string_series[string_series.str.lower().str.startswith('h')]
# Notice my original string_series is not mutated. 

string_series<jupyter_output><empty_output><jupyter_text>More Series Methods  `.any`, `.all`We can use the `.any` method to check if any value in the series is `True`, and `.all`, to check if every value in a Series is `True`. Both methods return a boolean value denoting whether the condition is met.For example, we could check to see if there are any negative values in a Series like this:<jupyter_code>numbers_series < 0
(numbers_series < 17).any()
(numbers_series < 0).all()<jupyter_output><empty_output><jupyter_text>We could check if all the numbers are positive like this:<jupyter_code>(numbers_series > 0).any()
(numbers_series > 0).all()
numbers_series.isna().any()<jupyter_output><empty_output><jupyter_text>`.isin`The `.isin` method can be used to tell whether each element in a Series matches an element in a passed sequence of values. For example, if we have a Series of letters, we could use `.isin` to tell whether each letter is a vowel.<jupyter_code># Create a list of vowels.

vowels = list('aeiou')
vowels
# Create a list of letters.

letters = list('abcdefghijk')
letters
# Construct a pandas Series from my list of letters.

letters_series = pd.Series(letters)
letters_series
# Use .isin to check if each element in letters_series matches an element in my list of vowels.

letters_series.isin(vowels)
# Use my Series of boolean values to return the values that meet my condition.

letters_series[letters_series.isin(vowels)]<jupyter_output><empty_output><jupyter_text>`.apply` Sometimes there are more complicated operations that we want to perform, and we need to apply a function to each element in a Series. In this case, we can define a function that handles a single value and use the `.apply` method to apply the function to each element in a Series.<jupyter_code>def even_or_odd(n):
    '''
    A function that takes a number and returns a string indicating whether the passed number is even or odd.
    
    >>> even_or_odd(3)
    'odd'
    >>> even_or_odd(2)
    'even'
    '''
    if n % 2 == 0:
        return 'even'
    else:
        return 'odd'

numbers_series.apply(even_or_odd)<jupyter_output><empty_output><jupyter_text>Here we define a function, `even_or_odd`, then reference that function when we call `.apply`. Notice that when we reference the `even_or_odd` function, we are **not** calling the function, rather, we are passing the `even_or_odd` function itself to the `.apply` method as an argument, which pandas will then call on every element of the Series.It is also very common to see lambda functions used along with `.apply`. We could re-write the above example with a lambda function like so:<jupyter_code>numbers_series.apply(lambda n: 'even' if n % 2 == 0 else 'odd')<jupyter_output><empty_output><jupyter_text>Exercises Part II Explore more attributes and methods while you continue to work with the fruits Series. 1. Capitalize all the string values in fruits.<jupyter_code>fruits.str.capitalize()<jupyter_output><empty_output><jupyter_text>2. Count the letter "a" in all the string values (use string vectorization).<jupyter_code>import numpy as np
np.sum(fruits.str.count('a'))<jupyter_output><empty_output><jupyter_text>3. Output the number of vowels in each and every string value.<jupyter_code>a = fruits.str.count('a')
e = fruits.str.count('e')
i = fruits.str.count('i')
o = fruits.str.count('o')
u = fruits.str.count('u')

vowel_counts = [a + e + i + o + u]
vowel_counts<jupyter_output><empty_output><jupyter_text>4. Write the code to get the longest string value from fruits.<jupyter_code>max(fruits, key=len)<jupyter_output><empty_output><jupyter_text>5. Write the code to get the string values with 5 or more letters in the name.<jupyter_code>fruits[fruits.str.len()>4]<jupyter_output><empty_output><jupyter_text>6. Use the `.apply` method with a lambda function to find the fruit(s) containing the letter `"o"` two or more times.<jupyter_code>fruits[fruits.apply(lambda x: x.count('o') >=2)]<jupyter_output><empty_output><jupyter_text>7. Write the code to get only the string values containing the substring "berry".<jupyter_code>fruits[fruits.str.contains('berry')]<jupyter_output><empty_output><jupyter_text>8. Write the code to get only the string values containing the substring "apple".<jupyter_code>fruits[fruits.str.contains('apple')]<jupyter_output><empty_output><jupyter_text>9. Which string value contains the most vowels?<jupyter_code>vowel_counts = fruits.str.count('[aeiou]')
vowel_counts
max_vowels = [fruits.str.count('[aeiou]')].max()
max_vowels<jupyter_output><empty_output><jupyter_text>___  Binning DataI can bin continuous data to convert it to categorical data. We will look at two different ways to accomplish binning below.<jupyter_code>s = pd.Series(list(range(15)))
s<jupyter_output><empty_output><jupyter_text>`pd.cut(s, bins=n)`We can either specify the number of bins to create, and pandas will create bins of equal size, or we can specify the bin edges ourselves by passing a list of bin edges or cutoffs.<jupyter_code># Bin values into 3 equal-sized bins.

pd.cut(s, 3)
# Bin values into bins with the cutoffs I specify. The bins are no longer of equal size.

pd.cut(s, [-1, 3, 12, 16])
# How many values fall into each bin? I can chain on the value_counts method.

pd.cut(s, 3).value_counts()<jupyter_output><empty_output><jupyter_text>`value_counts(bins=n)`The `value_counts` method can also be valuable here. It has a parameter named `bins`, which will allow us to quickly bin and group our data at the same time if that is our desired end goal.<jupyter_code>s.value_counts(bins=3)<jupyter_output><empty_output><jupyter_text>Plotting Data**The `.plot()` method** allows us to quickly visualize the data in a Series. It's built on top of Matplotlib!- By default, Matplotlib will choose the best type of plot for us.- We can also customize our plot using the paramters of the `.plot` method or by using Matplot lib if we like. We will look at examples of both ways below.Check the docs [here](https://pandas.pydata.org/pandas-docs/version/0.24.2/reference/api/pandas.Series.plot.html) for more on the `.plot()` method.<jupyter_code># Matplotlib is choosing the plot for us here, and it might tell the story we want.

nums_series = pd.Series([1, 5, 5, 5, 10, 20, 100, 40])
nums_series.plot()

plt.show()<jupyter_output><empty_output><jupyter_text>We can also use specific types of visualizations like this:<jupyter_code># So, here we specify the type of plot we would like Matplotlib to use.
nums_series.plot()

plt.show()<jupyter_output><empty_output><jupyter_text>The `.value_counts` method returns a Series, so we can call `.plot` method on the resulting Series; this is called method chaining.<jupyter_code># Construct the Series.
lets_series = pd.Series(['a', 'b', 'a', 'c', 'b', 'a', 'd', 'a'])
lets_series.value_counts()
# Plot the value_counts of our Series. Rotate our x-tick values.
lets_series.value_counts().plot.bar(rot=0)

plt.show()<jupyter_output><empty_output><jupyter_text>Any additional keyword arguments passed to pandas `.plot` method will be passed along to the corresponding Matplotlib functions. In addition, we can use Matplotlib the same way we have before to set titles, tweak axis labels, etc. Let's look at both ways.<jupyter_code># Use the parameters of the .plot method to customize my chart.

pd.Series['a', 'b', 'a', 'c', 'b', 'a', 'd', 'a']).value_counts().plot.bar(title='Example Pandas Visualization', 
                                                                            rot=0, 
                                                                            color='firebrick', 
                                                                            ec='black',
                                                                            width=.9).set(xlabel='Letter',
                                                                                         ylabel='Frequency')

plt.show()
# Use Matplotlib to customize.

pd.Series(['a', 'b', 'a', 'c', 'b', 'a', 'd', 'a']).value_counts().plot.bar(color='firebrick', width=.9)
plt.title('Example Pandas Visualization')
plt.xticks(rotation=0)
plt.xlabel('Letter')
plt.ylabel('Frequency')

plt.show()<jupyter_output><empty_output><jupyter_text>Further Reading- [pandas documentation: `Series`](https://pandas.pydata.org/pandas-docs/stable/getting_started/dsintro.htmlseries) ___  Exercises Part III Use pandas to create a Series named letters from the following string:        'hnvidduckkqxwymbimkccexbkmqygkxoyndmcxnwqarhyffsjpsrabtjzsypmzadfavyrnndndvswreauxovncxtwzpwejilzjrmmbbgbyxvjtewqthafnbkqplarokkyydtubbmnexoypulzwfhqvckdpqtpoppzqrmcvhhpwgjwupgzhiofohawytlsiyecuproguy'1. Which letter occurs the most frequently in the letters Series?<jupyter_code>import pandas as pd
letters = list('<KEY>')
letters = pd.Series(list(letters))
letters.mode()<jupyter_output><empty_output><jupyter_text>2. Which letter occurs the least frequently?<jupyter_code>letters.value_counts().sort_values(ascending = False)<jupyter_output><empty_output><jupyter_text>3. How many vowels are in the Series?<jupyter_code>letters.str.lower().str.count('[aeiou]').sum()<jupyter_output><empty_output><jupyter_text>4. How many consonants are in the Series?<jupyter_code>letters.str.lower().str.count('[^aeiou]').sum()<jupyter_output><empty_output><jupyter_text>5. Create a Series that has all of the same letters but uppercased.<jupyter_code>letters.str.upper()<jupyter_output><empty_output><jupyter_text>6. Create a bar plot of the frequencies of the 6 most commonly occuring      letters.<jupyter_code>letters.value_counts().head(7).plot(kind = 'barh',
                                  color = 'red',
                                  ec = 'black',
                                  width = 1)<jupyter_output><empty_output><jupyter_text>Use pandas to create a Series named numbers from the following list:        ['$796,459.41', '$278.60', '$482,571.67', '$4,503,915.98', '$2,121,418.3', '$1,260,813.3', '$87,231.01', '$1,509,175.45', '$4,138,548.00', '$2,848,913.80', '$594,715.39', '$4,789,988.17', '$4,513,644.5', '$3,191,059.97', '$1,758,712.24', '$4,338,283.54', '$4,738,303.38', '$2,791,759.67', '$769,681.94', '$452,650.23'] 7. What is the data type of the numbers Series?<jupyter_code>nums_list = ['$796,459.41', '$278.60', '$482,571.67', '$4,503,915.98', '$2,121,418.3', '$1,260,813.3', '$87,231.01', '$1,509,175.45', '$4,138,548.00', '$2,848,913.80', '$594,715.39', '$4,789,988.17', '$4,513,644.5', '$3,191,059.97', '$1,758,712.24', '$4,338,283.54', '$4,738,303.38', '$2,791,759.67', '$769,681.94', '$452,650.23']
numbers = pd.Series(nums_list)<jupyter_output><empty_output><jupyter_text>8. How many elements are in the number Series?<jupyter_code>numbers.value_counts().sum()<jupyter_output><empty_output><jupyter_text>9. Perform the necessary manipulations by accessing Series attributes and methods to convert the numbers Series to a numeric data type.<jupyter_code>numbers.str.replace('$','').str.replace(',', '')<jupyter_output>/var/folders/x6/9q2vjsz90nx_0lgx5gr8g33w0000gn/T/ipykernel_21140/1003568862.py:1: FutureWarning: The default value of regex will change from True to False in a future version. In addition, single character regular expressions will *not* be treated as literal strings when regex=True.
  numbers.str.replace('$','').str.replace(',', '')<jupyter_text>10. Run the code to discover the maximum value from the Series.<jupyter_code>float(numbers).max()<jupyter_output><empty_output><jupyter_text>11. Run the code to discover the minimum value from the Series. 12. What is the range of the values in the Series?<jupyter_code>floats.max - floats.min<jupyter_output><empty_output><jupyter_text>13. Bin the data into 4 equally sized intervals or bins and output how many values fall into each bin.<jupyter_code>floats.value_counts(bin=4)<jupyter_output><empty_output><jupyter_text>14. Plot the binned data in a meaningful way. Be sure to include a title and axis labels. Use pandas to create a Series named exam_scores from the following list:        [60, 86, 75, 62, 93, 71, 60, 83, 95, 78, 65, 72, 69, 81, 96, 80, 85, 92, 82, 78]        15. How many elements are in the exam_scores Series?<jupyter_code>exam_scores = [60, 86, 75, 62, 93, 71, 60, 83, 95, 78, 65, 72, 69, 81, 96, 80, 85, 92, 82, 78]
scores = pd.Series(exam_scores)<jupyter_output><empty_output><jupyter_text>16. Run the code to discover the minimum, the maximum, the mean, and the median scores for the exam_scores Series.<jupyter_code>scores.describe()<jupyter_output><empty_output><jupyter_text>17. Plot the Series in a meaningful way and make sure your chart has a title and axis labels.<jupyter_code>curved = scores - scores.max()
curved<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10594176837433524, 'fraction_numerical': 0.023529861881623752, 'mean_word_length': 4.785303231518371, 'pattern_counts': {'":': 0, '<': 276, '<?xml version=': 0, '>': 286, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 35, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '68', 'dir': 'jupyter-structured-clean-dedup', 'id': '206752', 'license': 'MIT', 'n_tokens_mistral': 8611, 'n_tokens_neox': 7987, 'n_words': 2815, 'path': 'pandas_series.ipynb', 'repo_name': 'jnolf/numpy-100', 'size': '26332'}