AttributeError: This method only works with the ScalarFormatter.

I’ve been trying to suppress this error using this line of code but the error keeps persisting:

Below is my entire block of code;

The main error comes in as a result of mixing up sns and matplotlib kind of labeling.

The correct way to solve this is to rotate the xticks using the matplotlib methods then also format it using matplotlib.

Try this:


Remove First and Last Character Part Two: Codewars.

This is a spin off of my first kata. You are given a list of character sequences as a comma separated string. Write a function which returns another string containing all the character sequences except the first and the last ones, separated by spaces. If the input string is empty, or the removal of the first and last items would cause the string to be empty, return a null value.

Solution:


Codewars: Very simple, given a number, find its opposite.

Examples:

Solutions:


Normalization — used when you want to set your values within certain limits i.e between two numbers. [0,1]

Standardization — transforms the data to have a zero mean and a standard deviation of 1.

They both make data unitless.

Why Scaling is Important.

If there’s a vast difference in the range of numbers, let’s say some ranging in thousands and others in tens, it makes the underlying assumption that higher ranging numbers have some kind of superiority to the algorithm.

  • Thus feature scaling is needed to bring every feature in the same footing without any upfront importance.
  • Another reason why…


(Error in validateCssUnit(sizeInfo$width) : CSS units must be a single-element numeric or character vector Calls: <Anonymous> … <Anonymous> -> need_screenshot -> toHTML -> validateCssUnit Execution halted)

R Markdown Error

This error is a common occurrence if you are doing dashboards for the first time and want the dashboards in form of a html file.

Solution to this is to update your html widgets on Rstudio.

Options on doing this;

  1. install.packages(‘html widgets’)
  2. Click on the Packages on the menu bar at the right bottom side of your ide, select install, search html widgets and install.

Let it run till installation is successful then Knit your RMarkdown.

After this I’m sure you can now have your dashboards in html or can view them on a browser.


Above are the key steps in solving a time series prediction problem. To check on seasonality, trends and residuals go ahead and do decomposition to the data.

Follow up on more of my articles to see how I solved a Dengue fever prediction case in San Juan, Puerto Rico and Iquitos in Peru.


In this case I was checking if my dataset had a question mark (?) . So after dropping all the rows with the question mark I used the code below to confirm it was all removed.

If the value was dropped it outputs False.


— -
title: “CarreFour Sales and Marketing Strategies

1. Research Question

Carrefour Kenya and are currently undertaking a project that will inform the marketing department on the most relevant marketing strategies that will result in the highest no. of sales (total price including tax).This project is aimed at doing analysis on the dataset provided by carrefour and create insights on how to achieve highest sales.

2. Metric of Success

Be able to do away with redundancy in the dataset and any existing anomaly.

3. Understanding the context.

Carre Four is an International chain of retail supemarkets in the world, It…


Importing pandasgui to my collab error.

Below is the error;

Solution to this is;

pandasgui uses QT running on your pc to open create the dataframe, this means it won’t work on your collab

Mj Cheruiyot

Data Enthusiast/ Lover of Technology

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store