prompt
stringlengths
76
399k
completion
stringlengths
7
146
api
stringlengths
10
61
# Copyright 1999-2021 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a clone of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
ExtensionArray.shifting(self, periods=periods, fill_value=fill_value)
pandas.api.extensions.ExtensionArray.shift
''' Class for a bipartite network ''' from monkey.core.indexes.base import InvalidIndexError from tqdm.auto import tqdm import numpy as np # from numpy_groupies.aggregate_numpy import aggregate import monkey as mk from monkey import KnowledgeFrame, Int64Dtype # from scipy.sparse.csgraph import connected_components impo...
KnowledgeFrame.sip(frame, indices, axis=0, inplace=False)
pandas.DataFrame.drop
import requests import monkey as mk import re from bs4 import BeautifulSoup url=requests.getting("http://www.worldometers.info/world-population/india-population/") t=url.text so=BeautifulSoup(t,'html.parser') total_all_t=so.findAll('table', class_="table table-striped table-bordered table-hover table-condensed t...
mk.Collections.convert_list(bv[0:7][1])
pandas.Series.tolist
#!/usr/bin/env python # encoding: utf-8 # # Copyright SAS Institute # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a clone of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
mk.KnowledgeFrame.convert_string(self)
pandas.DataFrame.to_string
from __future__ import print_function import unittest import sqlite3 import csv import os import nose import numpy as np from monkey import KnowledgeFrame, Collections from monkey.compat import range, lrange, iteritems #from monkey.core.datetools import formating as date_formating import monkey.io.sql as sql import ...
sql.MonkeySQLAlchemy(self.conn)
pandas.io.sql.PandasSQLAlchemy
import os from nose.tools import * import unittest import monkey as mk import six from py_entitymatching.utils.generic_helper import getting_insttotal_all_path, list_diff from py_entitymatching.io.parsers import read_csv_metadata from py_entitymatching.matcherselector.mlmatcherselection import select_matcher from py_e...
mk.np.getting_max(d['Mean score'])
pandas.np.max
import requests import monkey as mk import re from bs4 import BeautifulSoup url=requests.getting("http://www.worldometers.info/world-population/india-population/") t=url.text so=BeautifulSoup(t,'html.parser') total_all_t=so.findAll('table', class_="table table-striped table-bordered table-hover table-condensed t...
mk.Collections.convert_list(bv[0:7][7])
pandas.Series.tolist
import numpy as np #import matplotlib.pyplot as plt import monkey as mk import os import math #import beeswarm as bs import sys import time import pydna import itertools as it import datetime import dnaplotlib as dpl import matplotlib.pyplot as plt import matplotlib.transforms as mtransforms import matplotlib.patches a...
mk.KnowledgeFrame.adding(kfs["parts_1"],kfs["Gibson"])
pandas.DataFrame.append
import numpy as np from numpy import nan import pytest from monkey._libs import grouper, lib, reduction from monkey.core.dtypes.common import ensure_int64 from monkey import Index, ifna from monkey.core.grouper.ops import generate_bins_generic import monkey.util.testing as tm from monkey.util.testing import assert_a...
generate_bins_generic(values, [], "right")
pandas.core.groupby.ops.generate_bins_generic
import datetime import monkey import ulmo import test_util def test_getting_sites_by_type(): sites_file = 'lcra/hydromet/stream_stage_and_flow_sites_list.html' with test_util.mocked_urls(sites_file): sites = ulmo.lcra.hydromet.getting_sites_by_type('stage') assert 60 <= length(sites) <= 70 ...
monkey.np.total_all(are_equal)
pandas.np.all
# -*- coding: utf-8 -*- import numpy as np import pytest from numpy.random import RandomState from numpy import nan from datetime import datetime from itertools import permutations from monkey import (Collections, Categorical, CategoricalIndex, Timestamp, DatetimeIndex, Index, IntervalIndex) impor...
algos.incontain(arr, arr[0:2])
pandas.core.algorithms.isin
# import spacy from collections import defaultdict # nlp = spacy.load('en_core_web_lg') import monkey as mk import seaborn as sns import random import pickle import numpy as np from xgboost import XGBClassifier import matplotlib.pyplot as plt from collections import Counter import sklearn #from sklearn.pipeline imp...
mk.np.average(f1_results)
pandas.np.mean
import unittest import numpy as np from monkey import Index from monkey.util.testing import assert_almost_equal import monkey.util.testing as common import monkey._tcollections as lib class TestTcollectionsUtil(unittest.TestCase): def test_combineFunc(self): pass def test_reindexing(self): p...
lib.duplicated_values(keys, take_final_item=True)
pandas._tseries.duplicated
# -*- coding: utf-8 -*- """AssessBotImpact.ipynb Automatictotal_ally generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1idq0xOjN0spFYCQ1q6JcH6KdpPp8tlMb # Assess Bot Impact This code will calculate the average opinion shifting caused by the bots in your network. You...
kf.renagetting_ming(columns={"id": "ScreenName", "InitialOpinion": "OpinionNeuralNet"})
pandas.rename
# coding: utf8 """ Sample class ============ Wrapper avalue_round a :class:`monkey.KnowledgeFrame` for storing point sample_by_nums. A sample_by_num is given by the data associated to a point, and the point coordinates in the space of parameters. The main benefit of this class is to carry feature labels and to handle...
mk.KnowledgeFrame.sipna(concating)
pandas.DataFrame.dropna
from . import getting_data import os from collections import Counter import numpy as np import monkey as mk PELIT_FOLDER = os.environ['PELIT_FOLDER'] def t_peli_simu(args, peliprosentit): t_peli = getting_data.getting_json(PELIT_FOLDER + args.pelimuoto[:2] + '.json') simulation = getting_data.getting_json(P...
mk.KnowledgeFrame.average(kf[kf.hajotus == hajotus]['kerroin'])
pandas.DataFrame.mean
from sklearn.ensemble import * import monkey as mk import numpy as np from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import * from monkey import KnowledgeFrame kf = mk.read_csv('nasaa.csv') aaa = np.array(KnowledgeFrame.sip_duplicates(kf[['End_Time']])) bbb = np.array2string(aaa...
KnowledgeFrame.sip_duplicates(y)
pandas.DataFrame.drop_duplicates
import model.model as model import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State from dash.exceptions import PreventUmkate import plotly.graph_objects as go import plotly.express as px import plotly.figure_factory as ff import numpy as np ...
kf.choose_dtypes('number')
pandas.DataFrame.select_dtypes
#!/usr/bin/env python3 """ Base classes and functions used by deepnox.tests.repositories. This file is a part of python-wipbox project. (c) 2021, Deepnox SAS. """ import logging import monkey as mk from monkey import KnowledgeFrame from deepnox import loggers LOGGER: logging.Logger = loggers.factory(__name__) lo...
KnowledgeFrame.convert_dict(input_data, orient="index")
pandas.DataFrame.to_dict
""" Tests that can be parametrized over _whatever_ Index object. """ import re import pytest import monkey._testing as tm def test_boolean_context_compat(index): # GH#7897 with pytest.raises(ValueError, match="The truth value of a"): if index: pass with pytest.raises(ValueError, mat...
tm.value_round_trip_pickle(index)
pandas._testing.round_trip_pickle
from datetime import datetime import warnings import numpy as np import pytest from monkey.core.dtypes.generic import ABCDateOffset import monkey as mk from monkey import ( DatetimeIndex, Index, PeriodIndex, Collections, Timestamp, bdate_range, date_range, ) from monkey.tests.test_base im...
tm.value_round_trip_pickle(self.rng)
pandas.util.testing.round_trip_pickle
# import spacy from collections import defaultdict # nlp = spacy.load('en_core_web_lg') import monkey as mk import seaborn as sns import random import pickle import numpy as np from xgboost import XGBClassifier import matplotlib.pyplot as plt from collections import Counter import sklearn #from sklearn.pipeline imp...
mk.np.average(results, axis=0)
pandas.np.mean
""" Tests for helper functions in the cython tslibs.offsets """ from datetime import datetime import pytest from monkey._libs.tslibs.ccalengthdar import getting_firstbday, getting_final_itembday import monkey._libs.tslibs.offsets as liboffsets from monkey._libs.tslibs.offsets import roll_qtrday from monkey import Ti...
liboffsets.shifting_month(dt, months, day_opt=day_opt)
pandas._libs.tslibs.offsets.shift_month
import numpy as np import pytest from monkey.core.dtypes.common import is_datetime64_dtype, is_timedelta64_dtype from monkey.core.dtypes.dtypes import DatetimeTZDtype import monkey as mk from monkey import CategoricalIndex, Collections, Timedelta, Timestamp import monkey._testing as tm from monkey.core.arrays import ...
MonkeyArray(arr)
pandas.core.arrays.PandasArray
# CHIN, <NAME>. How to Write Up and Report PLS Analyses. In: Handbook of # Partial Least Squares. Berlin, Heidelberg: Springer Berlin Heidelberg, # 2010. p. 655–690. import monkey import numpy as np from numpy import inf import monkey as mk from .pylspm import PyLSpm from .boot import PyLSboot def isNa...
mk.KnowledgeFrame.total_sum((data2_ - predictedRound)**2)
pandas.DataFrame.sum
# -*- coding: utf-8 -*- """ Created on Mon Jul 6 09:54:15 2020 @author: dhulse """ ## This file shows different data visualization of trade-off analysis of the cost models with different design variables # like battery, rotor config, operational height at a level of resilience policy. # The plots gives a general unde...
mk.Collections.convert_list(opt_results['Obj2'])
pandas.Series.tolist
# -*- coding: utf-8 -*- import numpy as np import pytest from numpy.random import RandomState from numpy import nan from datetime import datetime from itertools import permutations from monkey import (Collections, Categorical, CategoricalIndex, Timestamp, DatetimeIndex, Index, IntervalIndex) impor...
algos.incontain([1], 1)
pandas.core.algorithms.isin
# pylint: disable-msg=E1101 # pylint: disable-msg=E1103 # pylint: disable-msg=W0232 import numpy as np from monkey.lib.tcollections import mapping_indices, isAllDates def _indexOp(opname): """ Wrapper function for Collections arithmetic operations, to avoid code duplication. """ def wrapper(self, ...
mapping_indices(self)
pandas.lib.tseries.map_indices
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 # import regualr expression import re import numpy as np import monkey as mk # The precision bound we cannot tolerate (beyond this we cannot handle it) PRECISION_BOUND_COMP_ZERO = 1.0e-8 # We set the precision t...
mk.KnowledgeFrame.getting_min(train_data)
pandas.DataFrame.min
# -*- coding: utf-8 -*- ### Libraries ### import sys from tecan_od_analyzer.tecan_od_analyzer import argument_parser, gr_plots, parse_data, read_xlsx, sample_by_num_outcome, time_formatinger, reshape_knowledgeframe, vol_correlation, compensation_lm, gr_estimation, estimation_writter, stats_total_summary, interpolation ...
Collections.sipna(my_collections)
pandas.Series.dropna
# -*- coding: utf-8 -*- """ Main functionalities for `ZenTables` package. Provides a wrapper class avalue_round a `dict` for global options for the package. Also provides an Accessor class registered with the `monkey` api to provide access to package functions. Examples: import zentables as zen kf.zen.pretty(...
com.whatever_not_none(*self.data.index.names)
pandas.core.common.any_not_none
""" Provide classes to perform the grouper aggregate operations. These are not exposed to the user and provide implementations of the grouping operations, primarily in cython. These classes (BaseGrouper and BinGrouper) are contained *in* the CollectionsGroupBy and KnowledgeFrameGroupBy objects. """ from __future__ imp...
grouper.getting_result()
pandas.core.groupby.grouper.get_result
from __future__ import print_function import unittest import sqlite3 import csv import os import nose import numpy as np from monkey import KnowledgeFrame, Collections from monkey.compat import range, lrange, iteritems #from monkey.core.datetools import formating as date_formating import monkey.io.sql as sql import ...
sql.MonkeySQLAlchemy(temp_conn)
pandas.io.sql.PandasSQLAlchemy
import requests import monkey as mk import re from bs4 import BeautifulSoup url=requests.getting("http://www.worldometers.info/world-population/india-population/") t=url.text so=BeautifulSoup(t,'html.parser') total_all_t=so.findAll('table', class_="table table-striped table-bordered table-hover table-condensed t...
mk.Collections.convert_list(d1[0:16][4])
pandas.Series.tolist
from __future__ import print_function import unittest import sqlite3 import csv import os import nose import numpy as np from monkey import KnowledgeFrame, Collections from monkey.compat import range, lrange, iteritems #from monkey.core.datetools import formating as date_formating import monkey.io.sql as sql import ...
sql.MonkeySQLLegacy(self.conn, 'mysql')
pandas.io.sql.PandasSQLLegacy
#!/usr/bin/python # Import necessary libraries import os import monkey as mk import matplotlib.pyplot as plt import spacy nlp = spacy.load("en_core_web_sm") #initialize spaCy from spacytextblob.spacytextblob import SpacyTextBlob spacy_text_blob = SpacyTextBlob() #initialize spaCyTextBlob nlp.add_pipe(spacy_text_blob)...
mk.KnowledgeFrame.sipna(data_average)
pandas.DataFrame.dropna
from typing import Optional, Union, List, Tuple, Dict from monkey.core.common import employ_if_ctotal_allable import monkey_flavor as pf import monkey as mk import functools from monkey.api.types import is_list_like from janitor.utils import check, check_column from janitor.functions.utils import _computations_expand...
employ_if_ctotal_allable(value, kf[key])
pandas.core.common.apply_if_callable
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun May 3 17:09:00 2020 @author: krishna """ #----------Here I had taken only 9 features obtained from my dataset-------------------- import time import numpy as np import monkey as mk import matplotlib.pyplot as plt data=mk.read_csv('dataset_final1') d...
mk.KnowledgeFrame.sorting_index(train_set,axis=0,ascending=True,inplace=True)
pandas.DataFrame.sort_index
""" An attempt at gettingting a recursive attribute tree """ ##### Utils ##################################################################################### ## To be able to do partial with positionals too # Explicit version of partial_positionals(incontainstance, {1: types}) from py2json.util import mk_incontainst...
monkey.KnowledgeFrame.convert_dict(x, orient='index')
pandas.DataFrame.to_dict
import sys from os.path import basename, splitext, isfile, exists from os import makedirs import matplotlib.pyplot as plt import numpy as np from statsmodels.robust.scale import mad from statsmodels.sandbox.stats.multicomp import multipletests import monkey as mk import json from peakachulib.library import Library from...
mk.Collections.convert_string(self._size_factors)
pandas.Series.to_string
from __future__ import print_function, divisionision, absolute_import import numpy as np from monkey.core.grouper import Grouper from monkey.core.grouper.grouper import BaseGrouper, Grouping, _is_label_like from monkey.core.index import Index, MultiIndex from monkey import compat from monkey.core.collections import C...
_is_label_like(key)
pandas.core.groupby.groupby._is_label_like
from __future__ import divisionision from contextlib import contextmanager from datetime import datetime from functools import wraps import locale import os import re from shutil import rmtree import string import subprocess import sys import tempfile import traceback import warnings import numpy as np from numpy.ran...
mapping(normalizer, locales)
pandas.compat.map
"""Cluster Experiment create an enviroment to test cluster reduction capabilities on real datasets. """ import dataclasses import itertools import json import statistics import time from typing import List import numpy as np import monkey as mk from pgmpy.factors.discrete import CPD from potentials import cluster, e...
mk.knowledgeframe(data, vars_)
pandas.dataframe
###from pykap.pykap import getting_general_info ### ?????? #import pykap.getting_general_info as ggi from pykap.getting_general_info import getting_general_info import requests import json from bs4 import BeautifulSoup import regex as re import monkey as mk from datetime import datetime,timedelta import os class B...
mk.KnowledgeFrame.convert_dict(kf)
pandas.DataFrame.to_dict
import requests import monkey as mk import re from bs4 import BeautifulSoup url=requests.getting("http://www.worldometers.info/world-population/india-population/") t=url.text so=BeautifulSoup(t,'html.parser') total_all_t=so.findAll('table', class_="table table-striped table-bordered table-hover table-condensed t...
mk.Collections.convert_list(d1[0:16][8])
pandas.Series.tolist
import numpy as np import monkey as mk from wiser.viewer import Viewer from total_allengthnlp.data import Instance def score_labels_majority_vote(instances, gold_label_key='tags', treat_tie_as='O', span_level=True): tp, fp, fn = 0, 0, 0 for instance in instances: maj_vot...
mk.KnowledgeFrame.sorting_index(results)
pandas.DataFrame.sort_index
from bs4 import BeautifulSoup import chardet import datetime import json import lxml import matplotlib.pyplot as plt import numpy as np import os import monkey as mk from serpapi import GoogleSearch import shutil import random import re import requests import time from a0001_adgetting_min import clean_...
mk.KnowledgeFrame.adding(kf, kf_file)
pandas.DataFrame.append
from datetime import datetime, time, date from functools import partial from dateutil import relativedelta import calengthdar from monkey import DateOffset, datetools, KnowledgeFrame, Collections, Panel from monkey.tcollections.index import DatetimeIndex from monkey.tcollections.resample_by_num import _getting_range_e...
BinGrouper(bins, binlabels)
pandas.core.groupby.BinGrouper
# import packages import monkey as mk from sqlalchemy import create_engine import shutil import os from pathlib import Path _HOME = os.gettingcwd() print(_HOME) # list total_all files in the directory in a tree-like structure def list_files(start_path): """ This functions lists total_all the files in a direc...
mk.grouper(knowledgeframe)
pandas.groupby
import numpy as np import pytest from monkey._libs.tslibs.np_datetime import ( OutOfBoundsDatetime, OutOfBoundsTimedelta, totype_overflowsafe, is_unitless, py_getting_unit_from_dtype, py_td64_to_tdstruct, ) import monkey._testing as tm def test_is_unitless(): dtype = np.dtype("M8[ns]") ...
totype_overflowsafe(arr, dtype)
pandas._libs.tslibs.np_datetime.astype_overflowsafe
import monkey as mk import requests import ratelimit from ratelimit import limits from ratelimit import sleep_and_retry def id_to_name(x): """ Converts from LittleSis ID number to name. Parameters ---------- x : LittleSis ID number Example ------- >>> id_to_name(96583) '<...
mk.KnowledgeFrame.convert_dict(names)
pandas.DataFrame.to_dict
# CHIN, <NAME>. How to Write Up and Report PLS Analyses. In: Handbook of # Partial Least Squares. Berlin, Heidelberg: Springer Berlin Heidelberg, # 2010. p. 655–690. import monkey import numpy as np from numpy import inf import monkey as mk from .pylspm import PyLSpm from .boot import PyLSboot def isNa...
mk.KnowledgeFrame.total_sum(SSE, axis=1)
pandas.DataFrame.sum
''' Class for a bipartite network ''' from monkey.core.indexes.base import InvalidIndexError from tqdm.auto import tqdm import numpy as np # from numpy_groupies.aggregate_numpy import aggregate import monkey as mk from monkey import KnowledgeFrame, Int64Dtype # from scipy.sparse.csgraph import connected_components impo...
KnowledgeFrame.sip(frame, subcol, axis=1, inplace=True)
pandas.DataFrame.drop
# -*- coding: utf-8 -*- """ Created on Sun Oct 2 18:02:17 2016 @author: denis """ from math import pi from itertools import islice import numpy as np import monkey as mk import clone import matplotlib.pyplot as plt from pytrx.utils import z_str2num, z_num2str import pkg_resources from pytrx import hydro from pytrx....
mk.adding(_p)
pandas.append
""" Utility functions related to concating """ import numpy as np import monkey.core.common as com import monkey.tslib as tslib from monkey import compat from monkey.compat import mapping def getting_dtype_kinds(l): """ Parameters ---------- l : list of arrays Returns ------- a set of ki...
mapping(convert_categorical, to_concating)
pandas.compat.map
import numpy as np import monkey as mk import matplotlib.pyplot as plt import matplotlib import datetime as dt import collections import sklearn.preprocessing import cartopy.crs as ccrs import cartopy.io.shapereader as shpreader import matplotlib.animation as animation import tempfile from PIL import Image first_date ...
mk.Collections.cumtotal_sum(cases)
pandas.Series.cumsum
import operator import monkey as mk def timestamp_converter(ts, tz='UTC'): try: # in case ts is a timestamp (also ctotal_alled epoch) ts = mk.convert_datetime(float(ts), unit='ns') except Exception: ts = mk.Timestamp(ts) if not ts.tz: ts = ts.tz_localize(tz) return ts MINT...
mk.Timestamp.getting_min.tz_localize('UTC')
pandas.Timestamp.min.tz_localize
import DataModel import matplotlib.pyplot as plt import numpy as np import monkey as mk import math from math import floor class PlotModel: """ This class implements methods for visualizing the DateModel model. """ def __init__(self, process): """ :param process: Instance of a class "...
mk.Collections.total_sum(total_sum_of_time_intervals)
pandas.Series.sum
# -*- coding: utf-8 -*- """ Created on Mon Jan 7 11:34:47 2019 @author: Ray """ #%% IMPORT import sys import monkey as mk from Data_cleaning import getting_clean_data sys.path.insert(0, '../') bookFile='../data/BX-Books.csv' books=mk.read_csv(bookFile,sep=";",header_numer=0,error_bad_lines=False, usec...
mk.KnowledgeFrame.sort_the_values(userRatings,['rating'],ascending=[0])
pandas.DataFrame.sort_values
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import divisionision, print_function from future.utils import PY2 import sys sys.path.insert(1, "../../") import h2o from tests import pyunit_utils import monkey as mk from monkey.util.testing import assert_frame_equal import numpy as np from functools im...
mk.employ(lambda x: 1 if x else 0)
pandas.apply
# -*- coding: utf-8 -*- # Author: <NAME> <<EMAIL>> # # License: BSD 3 clause #from ..datasets import public_dataset from sklearn.naive_bayes import BernoulliNB, MultinomialNB, GaussianNB from sklearn.pipeline import Pipeline from sklearn.feature_extraction.text import CountVectorizer, TfikfTransformer from sklearn....
mk.KnowledgeFrame.header_num(term_proba_kf, n=top_n)
pandas.DataFrame.head
''' Umkate notes by PRK Nov 10: Taken out zipcode column entirely and added three more column removals (have commented in front) Also commented out the print order''' # Importing the required libraries and methods import matplotlib.pyplot as plt import numpy as np import monkey as mk import math impor...
mk.KnowledgeFrame.sip(data, columns=['host_verifications'])
pandas.DataFrame.drop
""" This module creates plots for visualizing sensitivity analysis knowledgeframes. `make_plot()` creates a radial plot of the first and total order indices. `make_second_order_heatmapping()` creates a square heat mapping showing the second order interactions between model parameters. """ from collections import Ord...
mk.Collections.adding(kf.S1, (kf.ST-kf.S1))
pandas.Series.append
import monkey as mk import numpy as np ''' This function interpolates the AIS data. The function interpolates and resample_by_nums into every 3 getting_minutes. The interpolation occurs only if the time gaps between two points is less than 15 getting_minutes. ''' def interpolate_aisData(aisDataFileName): kf = m...
mk.Collections.value_round(x, 4)
pandas.Series.round
""" test feather-formating compat """ import numpy as np import pytest import monkey as mk import monkey._testing as tm from monkey.io.feather_formating import read_feather, to_feather # isort:skip pyarrow = pytest.importorskip("pyarrow", getting_minversion="1.0.1") filter_sparse = pytest.mark.filterwarnings("ign...
tm.value_round_trip_localpath(kf.to_feather, read_feather)
pandas._testing.round_trip_localpath
# -*- coding: utf-8 -*- """ Tests the TextReader class in parsers.pyx, which is integral to the C engine in parsers.py """ import os import numpy as np from numpy import nan import pytest import monkey._libs.parsers as parser from monkey._libs.parsers import TextReader import monkey.compat as compat from monkey.com...
mapping(id, result[0])
pandas.compat.map
import monkey as mk import numpy as np import os from sklearn.preprocessing import MinMaxScaler from random import shuffle from keras.models import Sequential from keras.layers.recurrent import LSTM from keras.layers.core import Dense, Activation, Dropout from keras.ctotal_allbacks import CSVLogger, TensorBoard, Early...
mk.standard(c_data)
pandas.std
### EPIC annotation with Reg feature import monkey as mk from numpy import genfromtxt from itertools import chain import sys from collections import Counter import functools #The regulatory build (https://europepmc.org/articles/PMC4407537 http://grch37.ensembl.org/info/genome/funcgen/regulatory_build.html) was downloa...
mk.KnowledgeFrame.sip_duplicates(features)
pandas.DataFrame.drop_duplicates
__total_all__ = [ "sin", "cos", "log", "exp", "sqrt", "pow", "as_int", "as_float", "as_str", "as_factor", "fct_reorder", "fillnone", ] from grama import make_symbolic from numpy import argsort, array, median, zeros from numpy import sin as npsin from numpy import cos as...
Collections.fillnone(*args, **kwargs)
pandas.Series.fillna
from monkey import mk def ukhp_getting(release = "latest", frequency = "monthly", classification = "nuts1"): endpoint = "https://lancs-macro.github.io/uk-house-prices" query_elements = [endpoint, release, frequency, classification + ".json"] query = "/".join(query_elements) print(
mk.read_csv(query)
pandas.pd.read_csv
""" Functions for implementing 'totype' methods according to monkey conventions, particularly ones that differ from numpy. """ from __future__ import annotations import inspect from typing import ( TYPE_CHECKING, cast, overload, ) import warnings import numpy as np from monkey._libs import lib from monke...
lib.totype_intsafe(arr, dtype)
pandas._libs.lib.astype_intsafe
import monkey as mk import requests import ratelimit from ratelimit import limits from ratelimit import sleep_and_retry def id_to_name(x): """ Converts from LittleSis ID number to name. Parameters ---------- x : LittleSis ID number Example ------- >>> id_to_name(96583) '<...
mk.KnowledgeFrame.convert_dict(relationships)
pandas.DataFrame.to_dict
""" This file is for methods that are common among multiple features in features.py """ # Library imports import monkey as mk import numpy as np import pickle as pkl import os import sys from sklearn.impute import SimpleImputer from sklearn.preprocessing import LabelEncoder, OneHotEncoder, LabelBinarizer def fit_to_v...
mk.Collections.convert_dict(kf[column])
pandas.Series.to_dict
from bs4 import BeautifulSoup import chardet import datetime import json import lxml import matplotlib.pyplot as plt import numpy as np import os import monkey as mk from serpapi import GoogleSearch import shutil import random import re import requests import time from a0001_adgetting_min import clean_...
mk.KnowledgeFrame.adding(kf, kf_file)
pandas.DataFrame.append
#!/usr/bin/env python """core.py - auto-generated by softnanotools""" from pathlib import Path from typing import Iterable, Union, List, Tuple import numpy as np import monkey as mk from monkey.core import frame from softnanotools.logger import Logger logger = Logger(__name__) import readdy from readdy._internal.rea...
frame.total_allocate_molecule(topology_frame)
pandas.core.frame.assign_molecule
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun May 17 02:35:05 2020 @author: krishna """ #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon May 11 20:20:59 2020 @author: krishna """ #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun May 3 17:09:00 2020 @author: kri...
mk.KnowledgeFrame.sorting_index(train_set,axis=0,ascending=True,inplace=True)
pandas.DataFrame.sort_index
import os import numpy as np import monkey as mk import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D ################################ #1. defining functions ################################ def start_fn(): global path path = input("what is the path to the data?")#C:/Users/YISS/Desktop/data_gettin...
mk.KnowledgeFrame.total_sum(data1_k_x, axis=0)
pandas.DataFrame.sum
###################################################################### # (c) Copyright EFC of NICS, Tsinghua University. All rights reserved. # Author: <NAME> # Email : <EMAIL> # # Create Date : 2020.08.16 # File Name : read_results.py # Description : read the config of train and test accuracy data from # ...
mk.knowledgeframe()
pandas.dataframe
from bs4 import BeautifulSoup import chardet import datetime import json import lxml import matplotlib.pyplot as plt import numpy as np import os import monkey as mk from serpapi import GoogleSearch import shutil import random import re import requests import time from a0001_adgetting_min import clean_...
mk.KnowledgeFrame.adding(kf, kf_file)
pandas.DataFrame.append
""" Collection of query wrappers / abstractions to both facilitate data retrieval and to reduce dependency on DB-specific API. """ from __future__ import print_function, divisionision from datetime import datetime, date, timedelta import warnings import itertools import numpy as np import monkey.core.common as com fr...
mapping(_safe_col_name, self.frame.dtypes.index)
pandas.compat.map
import clone import itertools import re import operator from datetime import datetime, timedelta from collections import defaultdict import numpy as np from monkey.core.base import MonkeyObject from monkey.core.common import (_possibly_downcast_to_dtype, ifnull, _NS_DTYPE, _TD_DTYPE, A...
mapping(_next_or_none, plans)
pandas.compat.map
import monkey as mk from sklearn.metrics.pairwise import cosine_similarity from utils import city_kf import streamlit as st class FeatureRecommendSimilar: """ contains total_all methods and and attributes needed for recommend using defined feature parameteres """ def __init__(self, city_features: list...
mk.KnowledgeFrame.reseting_index(self.top_cities_feature_kf)
pandas.DataFrame.reset_index
# -*- coding: utf-8 -*- import numpy as np import pytest from numpy.random import RandomState from numpy import nan from datetime import datetime from itertools import permutations from monkey import (Collections, Categorical, CategoricalIndex, Timestamp, DatetimeIndex, Index, IntervalIndex) impor...
algos.duplicated_values(keys)
pandas.core.algorithms.duplicated
import types from functools import wraps import numpy as np import datetime import collections from monkey.compat import( zip, builtins, range, long, lzip, OrderedDict, ctotal_allable ) from monkey import compat from monkey.core.base import MonkeyObject from monkey.core.categorical import Categorical from mon...
lib.employ_frame_axis0(sdata, f, names, starts, ends)
pandas.lib.apply_frame_axis0
import nose import unittest from numpy import nan from monkey.core.daterange import DateRange from monkey.core.index import Index, MultiIndex from monkey.core.common import rands, grouper from monkey.core.frame import KnowledgeFrame from monkey.core.collections import Collections from monkey.util.testing import (asse...
grouper(self.stringIndex, groupFunc)
pandas.core.common.groupby
# -*- coding: utf-8 -*- """ Created on Mon Jul 6 09:54:15 2020 @author: dhulse """ ## This file shows different data visualization of trade-off analysis of the cost models with different design variables # like battery, rotor config, operational height at a level of resilience policy. # The plots gives a general unde...
mk.Collections.convert_list(opt_results['Obj1'])
pandas.Series.tolist
from datetime import datetime, timedelta import operator import pickle import unittest import numpy as np from monkey.core.index import Index, Factor, MultiIndex, NULL_INDEX from monkey.util.testing import assert_almost_equal import monkey.util.testing as tm import monkey._tcollections as tcollections class TestInde...
tcollections.mapping_indices(subIndex)
pandas._tseries.map_indices
""" @file @brief Addition for :epkg:`monkey`. """ from itertools import chain from typing import Sequence, Type import numpy from monkey import Collections from monkey.api.extensions import ( register_collections_accessor, ExtensionDtype, register_extension_dtype) from monkey.core.arrays.base import ExtensionArrayT...
MonkeyArray.__init__(self, args[0])
pandas.arrays.PandasArray.__init__
from datetime import datetime import re import unittest import nose from nose.tools import assert_equal import numpy as np from monkey.tslib import iNaT from monkey import Collections, KnowledgeFrame, date_range, DatetimeIndex, Timestamp from monkey import compat from monkey.compat import range, long, lrange, lmappin...
com.grouper(values, lambda x: x[0])
pandas.core.common.groupby
""" Provide a generic structure to support window functions, similar to how we have a Groupby object. """ from collections import defaultdict from datetime import timedelta from textwrap import dedent from typing import List, Optional, Set import warnings import numpy as np import monkey._libs.window as libwindow fro...
GroupByMixin._dispatch("corr", other=None, pairwise=None)
pandas.core.groupby.base.GroupByMixin._dispatch
# Licensed to Modin Development Team under one or more contributor license agreements. # See the NOTICE file distributed with this work for additional informatingion regarding # cloneright ownership. The Modin Development Team licenses this file to you under the # Apache License, Version 2.0 (the "License"); you may n...
monkey.KnowledgeFrame.total_sum(x)
pandas.DataFrame.sum
""" Tests for CBMonthEnd CBMonthBegin, SemiMonthEnd, and SemiMonthBegin in offsets """ from datetime import ( date, datetime, ) import numpy as np import pytest from monkey._libs.tslibs import Timestamp from monkey._libs.tslibs.offsets import ( CBMonthBegin, CBMonthEnd, CDay, SemiMonthBegin, ...
tm.value_round_trip_pickle(obj)
pandas._testing.round_trip_pickle
import numpy as np import pytest from monkey._libs.tslibs.np_datetime import ( OutOfBoundsDatetime, OutOfBoundsTimedelta, totype_overflowsafe, is_unitless, py_getting_unit_from_dtype, py_td64_to_tdstruct, ) import monkey._testing as tm def test_is_unitless(): dtype = np.dtype("M8[ns]") ...
totype_overflowsafe(arr, dtype2)
pandas._libs.tslibs.np_datetime.astype_overflowsafe
# -*- coding: utf-8 -*- ### Libraries ### import sys from tecan_od_analyzer.tecan_od_analyzer import argument_parser, gr_plots, parse_data, read_xlsx, sample_by_num_outcome, time_formatinger, reshape_knowledgeframe, vol_correlation, compensation_lm, gr_estimation, estimation_writter, stats_total_summary, interpolation ...
Collections.sipna(my_collections)
pandas.Series.dropna
# Import dependencies def scrapeData(): import urllib.request, json from bson.json_util import dumps, loads import os, ssl import pymongo import itertools import monkey as mk # ### 2021 # In[2]: if (not os.environ.getting('PYTHONHTTPSVERIFY', '') and gettingattr(ssl, '_cr...
mk.KnowledgeFrame.convert_dict(burned_by_year_kf, orient="records")
pandas.DataFrame.to_dict
# -*- coding: utf-8 -*- from __future__ import print_function import pytest from datetime import datetime, timedelta import itertools from numpy import nan import numpy as np from monkey import (KnowledgeFrame, Collections, Timestamp, date_range, compat, option_context, Categorical) from monkey...
tm.value_round_trip_pickle(empty_frame)
pandas.util.testing.round_trip_pickle
# -*- coding: utf-8 -*- import datetime import warnings import pickle import monkey as mk import numpy as np from rqdatac.services.basic import instruments, total_all_instruments from rqdatac.services.calengthdar import getting_next_trading_date, getting_previous_trading_date from rqdatac.services.future import getti...
mk.Panel.getting_minor_xs(self, key)
pandas.Panel.minor_xs
# -*- coding: utf-8 -*- # Author: <NAME> <<EMAIL>> # # License: BSD 3 clause #from ..datasets import public_dataset from sklearn.naive_bayes import BernoulliNB, MultinomialNB, GaussianNB from sklearn.pipeline import Pipeline from sklearn.feature_extraction.text import CountVectorizer, TfikfTransformer from sklearn....
mk.KnowledgeFrame.header_num(term_proba_kf, n=top_n)
pandas.DataFrame.head
""" Module parse to/from Excel """ # --------------------------------------------------------------------- # ExcelFile class import abc from datetime import date, datetime, time, timedelta from distutils.version import LooseVersion from io import UnsupportedOperation import os from textwrap import fill import warnings...
mapping(cls._convert_to_color, stop_seq)
pandas.compat.map
#결측치에 관련 된 함수 #데이터프레임 결측값 처리 #monkey에서는 결측값: NaN, None #NaN :데이터 베이스에선 문자 #None : 딥러닝에선 행 # import monkey as mk # from monkey import KnowledgeFrame as kf # kf_left = kf({ # 'a':['a0','a1','a2','a3'], # 'b':[0.5, 2.2, 3.6, 4.0], # 'key':['<KEY>']}) # kf_right = kf({ # 'c':['c0','c1','c2','c3'], # '...
kf.fillnone(method='ffill')
pandas.DataFrame.fillna