Skip to content

Instantly share code, notes, and snippets.

#check total number of males
totalMales = newDF.loc[(newDF.Gender=='Male')].count() #409
print("totalMales" + str(totalMales))
totalFemales = newDF.loc[(newDF.Gender=='Female')].count() #77
print("totalFemales" + str(totalFemales))
#males are more likely to borrow than females 409 > 77
import csv
import pandas as pd
import numpy as np
import re
import string
myDataFrame = pd.read_csv('Loan_payments_data_2020_unclean.csv')
myDataFrame = pd.read_csv('Loan_payments_data_2020_unclean.csv')
columnsDict = {"columnName": list(myDataFrame.columns)}
columnsDataFrame = pd.DataFrame(columnsDict)
replacedColumns = columnsDataFrame['columnName'].str.replace(r'(?<![^_]).', lambda x: x.group().upper())
myDataFrame.columns = list(replacedColumns)
myDataFrame['Gender'] = myDataFrame['Gender'].str.replace('^\s*$', 'NaN')
1.
Landlord userType will subscribed to:
a) (locality or city)-(building)-landlord
b) (locality or city)-(street)-landlord
c) (city or locality)-residents <only one of them>
d) (locality or city)-(building or street)-residents
@bibscy
bibscy / address
Created September 19, 2019 05:46
{
"addressType" : "Residential",
"adminAreaCode" : "",
"adminAreaName" : "Barking and Dagenham",
"block" : "",
"buildingName" : "Bath House",
"buildingNumber" : "5",
"city" : "Barking",
"company" : "",
"countryIso2" : "GB",
//
// extensionNotificationsMyStreet.swift
// App
//
// Created by Bogdan Barbulescu on 10/08/2018.
//
import Foundation
import Vapor
import HTTP
extension ChatViewController {
struct NotificationInfoChat {
let title: String
let body: String
let chatUID: String
let unreadMessagesCount: Int
import AVFoundation
import PlaygroundSupport
PlaygroundPage.current.needsIndefiniteExecution = true
class AudioPlayer {
var topAudioFiles: [AVAudioFile] = []
var engine:AVAudioEngine
var backgroundAudioNode: AVAudioPlayerNode
var backgroundAudioFile: AVAudioFile
//
// MediaTableViewCell.swift
// myStreet.com
//
// Created by Bogdan Barbulescu on 12/04/2018.
// Copyright © 2018 vividapartments. All rights reserved.
//
import UIKit
import SAMCache
@bibscy
bibscy / Player
Last active December 10, 2018 15:41
import UIKit
import MediaPlayer
import AVFoundation
class FirstViewController: UIViewController, MPMediaPickerControllerDelegate {
@IBAction func loadMusic(_ sender: Any) {