<jupyter_start><jupyter_text>Data Analysis with Python 3 an Pandas NOTE: In this notebook I'm following the pythonprogramming.net material. Summary- What is Data Analysis?- What is Pandas?- First steps What is Data Analysis? ⠀According to Monkey Learn, __Data Analysis__ is defined by the visualizing, interpreting, cleaning and _analyzing_ data process. This is intended to discover interesting insights that drive smarter and more effective business decisions. ⠀Monkey Learn has listed in their website the best Data Analysis Tools, as follow:MonkeyLearn | Perform no-code text analysisRapidMiner | Build predictive analysis modelsKNIME | Create data science workflowsTalend | Collect your data in a single platformExcel | Use powerful data analysis formulasAirtable | Part spreadsheet, part databasePower BI | See your results in real timeTableau | Visualize your results in styleClicData | Connect data and create interactive dashboardsR | The programming language for exploratory data analysisPython | The programming language for magine learningQlik | Perform in-memory data processingSAS Business Intelligence | Easy-to-understand visualizationsLooker | Tailored analyticvs solutionsSQL Programming Language | Easily organize structured data What is Pandas? ⠀According to ActiveState, Pandas is an open source Python package that is most widely used for Data Science/Data Analysis and Machine Learning tasks. It is build on top of another packaged named Numpy, which provides support for multi-dimensional arrays. ⠀As one of the most popular data wrangling packages, Pandas works well with many other data science modules inside the Python ecosystem, and is typically included in every Python distribution, from those that come with your OS to commercial vendor distribuitions like ActiveState's ActivePython.⠀Pandas makes it simple to do many of the time consuming, repetitive tasks associated with working with data, including:- Data cleasing- Data fill- Data normalization- Merges and joins- Data visualization- Statistical analysis- Data inspection- Loading and saving data- And much more First steps ⠀Here we can see some of the basic commands for us to have our first steps with Pandas. ⠀The first thing we have to do is to ```import``` the ```pandas``` library in our code, and that we can use ```pd``` to deal with pandas.<jupyter_code>import pandas as pd # 'pd' is a common sense abbreviation for this library.<jupyter_output><empty_output><jupyter_text>⠀Now, I want to read a .csv file named `avocado.csv` that you can find it right here. ⠀After getting the file uri, I'll attribute it to a variable (`uri`) before using it with pandas. ⠀Then, I'll create a Data Frame variable (`dataFrame`) that contains the instruction to read a .csv file. ⠀Note that we're using the keyword `pd` which stands for the library we just imported with the function `read_csv()` - responsible for the data reading. ⠀<jupyter_code>uri = 'https://raw.githubusercontent.com/naomilago/Data-Analysis-with-Python-3-and-Pandas/master/Assets/avocado.csv'

dataFrame = pd.read_csv(uri)<jupyter_output><empty_output><jupyter_text>⠀We might have so many rows in this file, so before showing it, let's know two other functions: `head()` and `tail()`. - `head()` -> Shows the first 5 elements- `tail()` -> Shows the last 5 elements ⠀PS.: We can pass the number we want as a parameter to show more or less elementens (works for both functions).<jupyter_code>dataFrame.head(3)
dataFrame.tail(6)<jupyter_output><empty_output><jupyter_text>⠀What about filtering to just one table? Let's do it now.<jupyter_code>dataFrame['AveragePrice'].head()<jupyter_output><empty_output><jupyter_text>⠀We also have a filter for a specific value in a column. Let's create a new data frame to list just Spokane regions.<jupyter_code>spokane_dataFrame = dataFrame[ dataFrame['region'] == 'Spokane']
spokane_dataFrame.head()<jupyter_output><empty_output><jupyter_text>⠀There's an interesting thing to note called `index`. Indexes are some kind of identifiers and you can see them in the "Unnamed: 0" collumn above or in this list below.<jupyter_code>spokane_dataFrame.index<jupyter_output><empty_output><jupyter_text>⠀Now, if we want to see all the unique values from a table, guess what we need to use? Exactly. An `unique()` function.<jupyter_code>dataFrame['region'].unique()
dataFrame<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.06984706687970783, 'fraction_numerical': 0.0015978087194704405, 'mean_word_length': 5.700305810397554, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 31, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '539948', 'license': 'MIT', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1159, 'n_words': 556, 'path': 'Introduction.ipynb', 'repo_name': 'naomilago/Data-Analysis-with-Python-3-and-Pandas', 'size': '4381'}