Collatz conjecture

Write a function that accepts two data frames and two arguments as inputs.The first
argument should tell the function whether you want to stack two data frames vertically
(i.e., by stacking their rows on top of each other), or horizontally.The second argument
should tell the function whether you’d like to inner or outer join the two data frames.Use
this function to combine two unrelated data frames, and bring the function to class with
you

Apply the Collatz conjecture to the following numbers:

  1. 30
  2. 27
  3. 3
    For each of the previous cases, compute the total number of iterations you had to
    apply to algorithm to arrive at number one.
    PCW from Session 24
  4. Create a short piece of code that plots the letters of your name as a scatter plot.
    The X axis should correspond to the position of the letter in your name (for
    example, for “Patrick” the X axis would be [1,2,3,4,5,6,7]). The Y axis should
    correspond to the position of the letter in the english alphabet (for example, the
    name “Patrick” would be [16, 1, 20, 18, 9, 3, 11]).
  5. This should take no more than 2 lines of code. If you’re using more than that
    you’re overthinking it.
  6. Your code should use the matplotlib scatterplot function.
  7. Including nice color schemes is optional but appreciated.
    PCW from Session 25
    ● Download the following dataset which covers imports to India over 8 years.
  8. https://www.kaggle.com/lakshyaag/india-trade-data#2018-2010_import.cs
    v
    ● Create a sharable Colab notebook.
  9. Colab link: https://colab.research.google.com/notebooks/welcome.ipynb
    ● Write a short piece of Python code that:
  10. Loads any necessary packages.
  11. Reads the datafile into a pandas DataFrame.
  12. Creates a new pandas DataFrame that contains only imports from the
    country whose name comes closest to yours in the alphabet. For example,
    the name “Anya” is closest to the country name “Andorra.”
  13. Creates a scatter plot of the data, plotting the year of import on the x axis,
    and the value of the product on the y axis. Include axis labels, axis ticks,
    and a title.
  14. Run the code to create the plot.
find the cost of your paper

This question has been answered.

Get Answer