<jupyter_start><jupyter_text>Tips  Introduction:This exercise was created based on the tutorial and documentation from [Seaborn](https://stanford.edu/~mwaskom/software/seaborn/index.html)  The dataset being used is tips from Seaborn. Step 1. Import the necessary libraries:<jupyter_code>import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns<jupyter_output>/Users/NazmiDere/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
  return f(*args, **kwds)
/Users/NazmiDere/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
  return f(*args, **kwds)
/Users/NazmiDere/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
  return f(*args, **kwds)
/Users/NazmiDere/opt/anaconda3/lib/python3.7/site-packages/statsmodels/tools/_testing.py:19: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.
  import pandas.util.testing as tm
/Users/NazmiDere/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py:219[...]<jupyter_text>Step 2. Import the dataset from this [address](https://raw.githubusercontent.com/guipsamora/pandas_exercises/master/07_Visualization/Tips/tips.csv).   Step 3. Assign it to a variable called tips<jupyter_code>tips = pd.read_csv('https://raw.githubusercontent.com/guipsamora/pandas_exercises/master/07_Visualization/Tips/tips.csv')
tips<jupyter_output><empty_output><jupyter_text>Step 4. Delete the Unnamed 0 column<jupyter_code>tips.drop('Unnamed: 0', axis=1, inplace=True)<jupyter_output><empty_output><jupyter_text>Step 5. Plot the total_bill column histogram<jupyter_code>sns.set_style('white')
sns.distplot(tips['total_bill'], bins=15)
sns.despine()<jupyter_output><empty_output><jupyter_text>Step 6. Create a scatter plot presenting the relationship between total_bill and tip<jupyter_code>sns.jointplot(tips['total_bill'], tips['tip'],)<jupyter_output><empty_output><jupyter_text>Step 7.  Create one image with the relationship of total_bill, tip and size. Hint: It is just one function.<jupyter_code>sns.pairplot(tips)<jupyter_output><empty_output><jupyter_text>Step 8. Present the relationship between days and total_bill value<jupyter_code>sns.stripplot(x='day', y='total_bill', data=tips)<jupyter_output><empty_output><jupyter_text>Step 9. Create a scatter plot with the day as the y-axis and tip as the x-axis, differ the dots by sex<jupyter_code>sns.stripplot(tips['tip'], tips['day'], hue=tips['sex'], palette='viridis')<jupyter_output><empty_output><jupyter_text>Step 10.  Create a box plot presenting the total_bill per day differetiation the time (Dinner or Lunch)<jupyter_code>sns.boxplot(x=tips['day'], y=tips['total_bill'], hue=tips['time'])<jupyter_output><empty_output><jupyter_text>Step 11. Create two histograms of the tip value based for Dinner and Lunch. They must be side by side.<jupyter_code>g = sns.FacetGrid(tips, col='time')
g.map(plt.hist, 'tip')<jupyter_output><empty_output><jupyter_text>Step 12. Create two scatterplots graphs, one for Male and another for Female, presenting the total_bill value and tip relationship, differing by smoker or no smoker They must be side by side.<jupyter_code>g = sns.FacetGrid(tips, col='sex')
g.map(sns.scatterplot, x=tips['total_bill'], y=tips['tip'], hue=tips['smoker'])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1140518417462483, 'fraction_numerical': 0.01937244201909959, 'mean_word_length': 7.07488986784141, 'pattern_counts': {'":': 0, '<': 44, '<?xml version=': 0, '>': 44, 'https://': 3, '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': '11', 'dir': 'jupyter-structured-clean-dedup', 'id': '472473', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 1332, 'n_tokens_neox': 1252, 'n_words': 300, 'path': '07_Visualization/Tips/Exercises.ipynb', 'repo_name': 'NazmiDere/pandas_exercises', 'size': '3665'}