Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,194,849 members, 7,956,188 topics. Date: Monday, 23 September 2024 at 07:20 AM

Ibromodzi's Posts

Nairaland Forum / Ibromodzi's Profile / Ibromodzi's Posts

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (of 11 pages)

Programming / Re: I'm Getting An Error While I Run This Python Codes by ibromodzi: 2:27pm On Dec 07, 2019
ibromodzi:
Hello great programmers, I'm new to pandas so I just downloaded this data set from Kaggle.com to practice with. However the program throws an error saying Object DataFrame is not callable. The dataset can be found here.
Here is the code

import pandas as pd
import numpy as np
import researchpy as rp
import scipy.stats
import matplotlib.pyplot as plt

un = pd.read_csv(r"C:\Users\ibrom\Documents\SAMPLE DATASET\Military Expenditure.csv"wink
#To know the country with highest spending
#first create a new column with total spending over the years

un['Total Spending'] = un.iloc[:, 5:64].sum(axis=1)

#sorting values to know the country with the highest and least spending
un.sort_values('Total Spending', ascending = False)

#filtering based on Type of region
man = rp.summary_cat(un['Type'])
man.reset_index()

#grouyping the countries into continents and assessing their military spending over the year
def continent(country):
if country in ('Algeria','Angola','Benin','Botswana','Burkina Faso','Burundi',
'Cabo Verde','Cameroon',
'Central African Republic','Chad','Comoros',
'Congo, Democratic Republic of the','Congo, Republic of the','Cote d\'Ivoire','Djibouti','Egypt',
'Equatorial Guinea','Eritrea','Eswatini',' Ethiopia', 'Gabon','Gambia','Ghana',
'Guinea',"Guinea-Bissau", 'Kenya', 'Lesotho', 'Liberia', 'Libya', 'Madagascar', 'Malawi', 'Mali',
'Mauritania', 'Mauritius', 'Morocco', 'Mozambique', 'Namibia', 'Niger', 'Nigeria', 'Rwanda',
'Sao Tome and Principe' 'Senegal', 'Seychelles', 'Sierra Leone', 'Somalia', 'South Africa', 'South Sudan',
'Sudan', 'Tanzania', 'Togo', 'Tunisia', 'Uganda', 'Zambia', 'Zimbabwe'):
return "Africa"
elif country in ('Afghanistan', 'Armenia', 'Azerbaijan', 'Bahrain', 'Bangladesh', 'Bhutan', 'Brunei'
'Cambodia', 'China', 'Cyprus', 'Georgia' 'India' 'Indonesia' 'Iran' 'Iraq', 'Israel' 'Japan Jordan',
'Kazakhstan', 'Kuwait', 'Kyrgyzstan', 'Laos','Lebanon', 'Malaysia', 'Maldives', 'Mongolia',
'Myanmar (formerly Burma)', 'Nepal','North Korea', 'Oman', 'Pakistan', 'Palestine', 'Philippines',
'Qatar', 'Russia', 'Saudi Arabia', 'Singapore', 'South Korea', 'Sri Lanka', 'Syria', 'Taiwan',
'Tajikistan', 'Thailand', 'Timor-Leste','Turkey','Turkmenistan', 'United Arab Emirates (UAE)',
'Uzbekistan', 'Vietnam', 'Yemen, Rep'):
return "Asia"
elif country in ('Albania', 'Andorra', 'Armenia', 'Austria', 'Azerbaijan', 'Belarus', 'Belgium', 'Bosnia and Herzegovina',
'Bulgaria', 'Croatia', 'Cyprus', 'Czechia', 'Denmark', 'Estonia', 'Finland', 'France', 'Georgia',
'Germany', 'Greece', 'Hungary', 'Iceland', 'Ireland', 'Italy', 'Kazakhstan', 'Kosovo', 'Latvia',
'Liechtenstein', 'Lithuania', 'Luxembourg', 'Malta', 'Moldova', 'Monaco', 'Montenegro',
'Netherlands', 'North Macedonia', 'Norway', 'Poland', 'Portugal','Romania' 'Russia' 'San Marino' 'Serbia',
'Slovakia', 'Slovenia', 'Spain', 'Sweden', 'Switzerland', 'Turkey', 'Ukraine', 'United Kingdom',
'Vatican City'):
return "Europe"
elif country in ('Antigua and Barbuda', 'Bahamas', 'Barbados', 'Belize Canada', 'Costa Rica', 'Cuba',
'Dominica Dominican Republic', 'El Salvador', 'Grenada', 'Guatemala', 'Haiti', 'Honduras', 'Jamaica',
'Mexico', 'Nicaragua', 'Panama', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Vincent and the Grenadines',
'Trinidad and Tobago', 'United States'):
return "North America"
elif country in ('Argentina', 'Bolivia', 'Brazil', 'Chile', 'Colombia', 'Ecuador', 'Guyana', 'Paraguay', 'Peru',
'Suriname', 'Uruguay', 'United States', 'Venezuela'):
return "South America"
elif country in ('Australia', 'Fiji', 'Kiribati', 'Marshall', 'Islands', 'Micronesia', 'Nauru', 'New Zealand',
'Palau', 'Papua New Guinea', 'Samoa', 'Solomon Islands', 'Tonga', 'Tuvalu', 'Vanuatu'):
return "Australia / Oceania"

# Creating the new column for continent
un['Continent'] = un['Name'].apply(continent)

# Create two new dataframes which are subsets of the original data
Europe = un(un['Continent'] == 'Europe')
Europe.reset_index(inplace = True)
NorthAmericaa = un(un['Continent'] == 'North America')

Problem solved. Thanks!
Programming / Re: I'm Getting An Error While I Run This Python Codes by ibromodzi: 11:03am On Dec 07, 2019
stanliwise:
We are not magicians, tell us the error Message you saw

I have stated it in my intro, the error is: DataFrame object is not callable when I tried to execute the last four lines of the code i.e

# Create two new dataframes which are subsets of the original data
Europe = un(un['Continent'] == 'Europe')
Europe.reset_index(inplace = True)
NorthAmericaa = un(un['Continent'] == 'North America')
Programming / I'm Getting An Error While I Run This Python Codes by ibromodzi: 8:11am On Dec 07, 2019
Hello great programmers, I'm new to pandas so I just downloaded this data set from Kaggle.com to practice with. However the program throws an error saying Object DataFrame is not callable. The dataset can be found here.
Here is the code

import pandas as pd
import numpy as np
import researchpy as rp
import scipy.stats
import matplotlib.pyplot as plt

un = pd.read_csv(r"C:\Users\ibrom\Documents\SAMPLE DATASET\Military Expenditure.csv"wink
#To know the country with highest spending
#first create a new column with total spending over the years

un['Total Spending'] = un.iloc[:, 5:64].sum(axis=1)

#sorting values to know the country with the highest and least spending
un.sort_values('Total Spending', ascending = False)

#filtering based on Type of region
man = rp.summary_cat(un['Type'])
man.reset_index()

#grouyping the countries into continents and assessing their military spending over the year
def continent(country):
if country in ('Algeria','Angola','Benin','Botswana','Burkina Faso','Burundi',
'Cabo Verde','Cameroon',
'Central African Republic','Chad','Comoros',
'Congo, Democratic Republic of the','Congo, Republic of the','Cote d\'Ivoire','Djibouti','Egypt',
'Equatorial Guinea','Eritrea','Eswatini',' Ethiopia', 'Gabon','Gambia','Ghana',
'Guinea',"Guinea-Bissau", 'Kenya', 'Lesotho', 'Liberia', 'Libya', 'Madagascar', 'Malawi', 'Mali',
'Mauritania', 'Mauritius', 'Morocco', 'Mozambique', 'Namibia', 'Niger', 'Nigeria', 'Rwanda',
'Sao Tome and Principe' 'Senegal', 'Seychelles', 'Sierra Leone', 'Somalia', 'South Africa', 'South Sudan',
'Sudan', 'Tanzania', 'Togo', 'Tunisia', 'Uganda', 'Zambia', 'Zimbabwe'):
return "Africa"
elif country in ('Afghanistan', 'Armenia', 'Azerbaijan', 'Bahrain', 'Bangladesh', 'Bhutan', 'Brunei'
'Cambodia', 'China', 'Cyprus', 'Georgia' 'India' 'Indonesia' 'Iran' 'Iraq', 'Israel' 'Japan Jordan',
'Kazakhstan', 'Kuwait', 'Kyrgyzstan', 'Laos','Lebanon', 'Malaysia', 'Maldives', 'Mongolia',
'Myanmar (formerly Burma)', 'Nepal','North Korea', 'Oman', 'Pakistan', 'Palestine', 'Philippines',
'Qatar', 'Russia', 'Saudi Arabia', 'Singapore', 'South Korea', 'Sri Lanka', 'Syria', 'Taiwan',
'Tajikistan', 'Thailand', 'Timor-Leste','Turkey','Turkmenistan', 'United Arab Emirates (UAE)',
'Uzbekistan', 'Vietnam', 'Yemen, Rep'):
return "Asia"
elif country in ('Albania', 'Andorra', 'Armenia', 'Austria', 'Azerbaijan', 'Belarus', 'Belgium', 'Bosnia and Herzegovina',
'Bulgaria', 'Croatia', 'Cyprus', 'Czechia', 'Denmark', 'Estonia', 'Finland', 'France', 'Georgia',
'Germany', 'Greece', 'Hungary', 'Iceland', 'Ireland', 'Italy', 'Kazakhstan', 'Kosovo', 'Latvia',
'Liechtenstein', 'Lithuania', 'Luxembourg', 'Malta', 'Moldova', 'Monaco', 'Montenegro',
'Netherlands', 'North Macedonia', 'Norway', 'Poland', 'Portugal','Romania' 'Russia' 'San Marino' 'Serbia',
'Slovakia', 'Slovenia', 'Spain', 'Sweden', 'Switzerland', 'Turkey', 'Ukraine', 'United Kingdom',
'Vatican City'):
return "Europe"
elif country in ('Antigua and Barbuda', 'Bahamas', 'Barbados', 'Belize Canada', 'Costa Rica', 'Cuba',
'Dominica Dominican Republic', 'El Salvador', 'Grenada', 'Guatemala', 'Haiti', 'Honduras', 'Jamaica',
'Mexico', 'Nicaragua', 'Panama', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Vincent and the Grenadines',
'Trinidad and Tobago', 'United States'):
return "North America"
elif country in ('Argentina', 'Bolivia', 'Brazil', 'Chile', 'Colombia', 'Ecuador', 'Guyana', 'Paraguay', 'Peru',
'Suriname', 'Uruguay', 'United States', 'Venezuela'):
return "South America"
elif country in ('Australia', 'Fiji', 'Kiribati', 'Marshall', 'Islands', 'Micronesia', 'Nauru', 'New Zealand',
'Palau', 'Papua New Guinea', 'Samoa', 'Solomon Islands', 'Tonga', 'Tuvalu', 'Vanuatu'):
return "Australia / Oceania"

# Creating the new column for continent
un['Continent'] = un['Name'].apply(continent)

# Create two new dataframes which are subsets of the original data
Europe = un(un['Continent'] == 'Europe')
Europe.reset_index(inplace = True)
NorthAmericaa = un(un['Continent'] == 'North America')
Programming / Re: Customized Laptop Skin by ibromodzi: 7:38am On Nov 27, 2019
Do you have for hp elite book mini? And can I get it in Ilorin?
Programming / Re: Data Scientist Only by ibromodzi: 7:15pm On Nov 26, 2019
You are doing a good job. I'm still in the process of learning data analysis. I'll soon go into Machine Learning.
Programming / Re: Chronicle Of A Data Scientist/analyst by ibromodzi: 5:17pm On Nov 17, 2019
Ejiod:

There are 2 or if not 3 field in data analysis
Descriptive/Explorative analysis
You need to master these skills
Excel,PowerBI,Tableau,Pandas,SQL,

Predictive analysis
This is where machine learning,deep learning and NLP comes in.This forms the real basics of AI.

Both are under data science. However its advisable to have those skills set under both so you have edge.If you are just doing machine learning without knowing any visualization tools or excel it's just you playing around.

Boss please is it possible to analyze likert scale data with python? If not what's the best way to do it?

3 Likes

Programming / Re: Chronicle Of A Data Scientist/analyst by ibromodzi: 7:53am On Nov 11, 2019
I'm happy reading about bosses' narratives here. Really inspiring.
Well, I started learning python last month and due to my experience with C++, I was able to learn with the speed of light Lol.
So far I've mastered Numpy,Pandas, Matplotlib and a bit of Scipy, StatsModel and seaborn. I handled a mini project last week (a 'pseudo analysis' though, if there's anything like that) where I needed to read an excel file, make some analysis and visualize the results. It was really interesting working with the project. I'm currently delving into inferential statistics and I'll move on to machine learning later.

I'll be glad if bosses here can guide me into a more distinctive path because I learn everything myself. Python is indeed powerful

35 Likes 2 Shares

Programming / Re: Who Wants To Learn Programming In Python Easily Without Stress? READ THIS by ibromodzi: 4:26pm On Nov 03, 2019
081644029222
Programming / Re: Ethical Hacking And Penetration Testing For Educational Purposes by ibromodzi: 8:09pm On Oct 26, 2019
08164402922
Programming / Re: Python Tutorial Group by ibromodzi: 8:48am On Oct 06, 2019
08164402922
Science/Technology / Re: FGN Invites Recent 1st Class Graduates In Sciences And Engineering To TYSON by ibromodzi: 7:55am On Aug 09, 2019
imitateMe:
Just as Nigeria is good at winning u16 football cup; in the same vein, Nigeria loves producing first class graduates at BSc level.
You can't compete with the whites at advanced level All these talk talk won't get us anywhere; we are NOT INTELLIGENT enough!!

How many of our programmers can hack better than the Indians, Americans and Europeans? At least we all have computers. How many Nigerians can invent a cryptocurrency like Santoshi Nakamoto did? How many of our chess masters can beat the average Asian grandmaster?

We'd rather gather and talk, talk and talk!

What a dumb assertion! We have many Nigerians who are crypto developers, say only what you know.
Politics / Re: Buhari Approves State, LG Police by ibromodzi: 6:06pm On Jun 03, 2019
isthatso:


The comments in this section just shows how poorly educated Nigerians are. Misleading headline aside, Nowhere in that article did it say Buhari approved state police. It was merely a recommendation.

There will never be state police because that will mean the end of Fulani herdsmen
Politics / Re: Pictures From Swearing In Ceremony Of Atiku Bagudu In Kebbi State by ibromodzi: 6:25pm On May 29, 2019
Redeakaa:


Nice.....are u a Christian

Nah
Politics / Re: Pictures From Swearing In Ceremony Of Atiku Bagudu In Kebbi State by ibromodzi: 6:15pm On May 29, 2019
Almunjid:


23hours power supply for Nigeria? Are u sure ur state is part of the Naija I know? grin


That's the fact bro...

1 Like

Politics / Re: Pictures From Swearing In Ceremony Of Atiku Bagudu In Kebbi State by ibromodzi: 6:13pm On May 29, 2019
Redeakaa:


Somewhere along WUFEDP

Wow... I stay in Badariya

1 Like 1 Share

Politics / Re: Pictures From Swearing In Ceremony Of Atiku Bagudu In Kebbi State by ibromodzi: 5:41pm On May 29, 2019
Redeakaa:
That's my state..
He does well when it comes to salary payments and also sustained power supply..

We dey see like at least 23hours a day most times

Thumbs up Bagudu

Where do you stay in Kebbi?
Education / Re: What Do First Class Graduates Do Different From Other 2.1 Students? by ibromodzi: 7:01pm On Mar 23, 2019
Durentt:
Hello I'm a second year engineering student who just finished first year with a 4.11. The majority of my friends are on a 4.6 above and no, I'm not jealous of them because I know they worked harder than myself last year, I was busy mixing school with romance and play.

But now I was just wondering. Of course it's a new semester and students have begun reading already. At the end of the semester, some will have a 4.7, 4.3 others will get a 3.5, others even 2.8.
Why this difference when they all read and prepared from the start of the semester. What do first class graduates do that others don't.

There are five first class students in my class including myself with the first two being females. These girls are so accurate and precise when they answer questions, thus they tend to score higher marks.
This always got me thinking and I would ask myself what's so extraordinary in them but I later got to find these;

They don't joke with note taking in class which I am always lackadaisical about (since all our notes are in power points).

They do their assignments the first day the lecturer gives them(as for me, I don't take assignments serious untill the last minutes).

They do listen in class attentively( I don't usually care about this since the notes will be given out at the end of the classes)

They are always the most active whenever they find themselves working in a group.

Apart from these, I do read a lot because that's like a hobby to me. My CGPA was growing steadily from 100 level not until I tried to involve myself in a relationship in 400level first semester and this affected my result(I managed to have three As which was very rare of me), immediately I realized this I tightened my belt and made up for it in second semester, though my G.p fell from 4.62 to 4.57. Now in 500L

My tactics; Whenever I'm reading for tests or exams, I do read the lecturer's mind(trying to make a mental map of the questions the lecturer is likely to ask). I do this carefully by rewriting the notes(no matter how bulky) in a jotter and revising it many times.

6 Likes 1 Share

Politics / Re: Greatest Losers In This Elections.... by ibromodzi: 12:01am On Mar 11, 2019
SouthEastFacts:

So you just rushed and open a new moniker just to talk what you don't know.

As for Kwara, it is never about Saraki. It is more of religious than political. But they will never tell you.

Ilorin brand of islam is scary. So leave Kwara out of this matter.

Saraki would have won if he is still with Buhari.

Oga you know nothing about Kwara for spewing this trash.
Politics / Re: Opinion: INEC Should Ditch Paper Ballot For Online Elections. by ibromodzi: 12:11pm On Mar 10, 2019
grossintel:
Why not online? That's the only way this ballot snatching and rigging can stop. There should be electronic voting centers where people who don't know how to use a computer go to vote for their choice, then the file storing the vote will be encrypted and sent to a secure server abroad. The server now checkes for the encryption key and compares it with the encryption key of the voting center where the vote was made before the file will be decrypted and stored. So even if somehow, an attempt is made to send votes to the server from a compromised computer the encryption key won't add up and the server will reject the file and block the Ip from sending to it anymore.

There should be a portal where anyone who wishes to check if their vote counted can simply open up their mobile phone or computer, visit the website and type in their registration number and it will bring up your full details including the time you voted, the center and the candidate you voted.

This is practically possible and this is how a 200 billion naira election should be.

I get you.
Like a voting system running on the blockchain
Education / Re: Federal Government Scholarship (fsb 2018) Thread by ibromodzi: 10:35am On Feb 17, 2019
08164402922
Please add
Foreign Affairs / Re: 16 Amazing Facts About Queen Elizabeth II by ibromodzi: 6:18pm On Feb 08, 2019
Is it true that she's kleptomaniac?

9 Likes

Education / Re: Federal Government Scholarship (fsb 2018) Thread by ibromodzi: 2:43pm On Jan 22, 2019
08164402922

Add please
Programming / Re: How Far Can I Code With My Phone? by ibromodzi: 9:24pm On Jan 13, 2019
greatface:
Someone suggested cloud9 at some point but i have not used it. Maybe you can check it out.

Ok I will
Programming / Re: How Far Can I Code With My Phone? by ibromodzi: 9:21pm On Jan 13, 2019
greatface:
Start saving for a laptop.

At the moment, if you're into web development, download pydroid, install django and you're good to go. With it you can achieve nearly everything possible with pc except databases.

Aide is great for java. It even compiles natively.

I'll try this out
Programming / Re: How Far Can I Code With My Phone? by ibromodzi: 9:21pm On Jan 13, 2019
Ikennablue:
08121148673 WhatsApp

Pm sent
Phones / Re: How Do I Upgrade My Lumia 535 To Windows 10 by ibromodzi: 4:37pm On Jan 12, 2019
ItrendNaija:
The only way u can upgrade your Lumia 535is to switch to Android or iOS grin

Lol
Phones / Re: How Do I Upgrade My Lumia 535 To Windows 10 by ibromodzi: 4:37pm On Jan 12, 2019
rapthugx:


Please don't get me wrong, you don't need WiFi to connect download the upgrade advisor app, you need WiFi to upgrade your phone to windows 10 (after you must have downloaded the upgrade advisor)

I understand
Programming / Re: How Far Can I Code With My Phone? by ibromodzi: 8:31am On Jan 12, 2019
Ikennablue:
i have created an app with just my phone, it's an hybrid app, wrote the code on webmaster lite using bootstrap, javascript and jquery.

I tested it on UC browser then i converted it to an app with phonegap.

Wow!
I'll like to know more about this. Can I send you a pm?
Programming / Re: How Far Can I Code With My Phone? by ibromodzi: 6:27am On Jan 12, 2019
Towbaba500:
Sorry which language
If it's Python,get pydroid from playstore,if it's html css and js get anwritwer there are other ides for java c++ etc on playstore

Thanks but the question is how far can one go with these apps. I used to practice with cppdroid but had to stop because of my perceived limitations. For example, you can't make app with it
Phones / Re: How Do I Upgrade My Lumia 535 To Windows 10 by ibromodzi: 2:16am On Jan 12, 2019
rapthugx:
From windows store, download upgrade advisor then run it to check if you can upgrade your phone.
NB You will need a WiFi to upgrade your phone.
Thanks a bunch
I'll do that once I get connected to WiFi
Programming / Re: How Far Can I Code With My Phone? by ibromodzi: 10:39pm On Jan 11, 2019
Capnd143:
Go to the Android playstore, download the sololearn app. Please please please.. make sure you thank me later wink wink
I'm talking about IDE and other right tools for creating apps

1 Like

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (of 11 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 62
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.