100+ results results for 'import pandas' (46 ms)
4""" 5from __future__ import division 6 6 7from functools import wraps 8 12from pandas.core.api import DataFrame, Series, notnull 13import pandas._tseries as _tseries 14 14 15from pandas.util.decorators import Substitution, Appender 16 183 """ 184 from pandas import Panel 185 from collections import defaultdicttest_moments.py https://github.com/dasfaha/pandas.git | Python | 273 lines
1import unittest 2import nose 3 4from datetime import datetime 5from numpy.random import randn 5from numpy.random import randn 6import numpy as np 7 7 8from pandas.core.api import Series, DataFrame, DateRange 9from pandas.util.testing import assert_almost_equal 9from pandas.util.testing import assert_almost_equal 10import pandas.core.datetools as datetools 11import pandas.stats.moments as moments 11import pandas.stats.moments as moments 12import pandas.util.testing as tm 13util.py https://github.com/burakbayramli/classnotes.git | Python | 400 lines
1from scipy.optimize import minimize 2import pandas as pd, random 3import numpy as np, datetime 3import numpy as np, datetime 4import scipy.stats 5run_inversion_gridded2.py https://gitlab.com/flomertens/sph_img | Python | 252 lines
1import os 2import sys 2import sys 3import time 4import shutil 5 6import matplotlib as mpl 7mpl.use('Agg') 9from libwise import scriptshelper as sh 10from libwise import profileutils 11 11 12import sphimg 13import util 15import numpy as np 16import pandas as pd 17convo_net.py https://gitlab.com/Mounphuix/MNIST | Python | 251 lines
1from __future__ import print_function 2import os 2import os 3import sys 4import timeit 5import numpy as np 6import pandas as pd 7import theano 7import theano 8import theano.tensor as T 9import six.moves.cPickle as pickle 9import six.moves.cPickle as pickle 10from network_layers import LogisticRegression 11from network_layers import HiddenLayer 11from network_layers import HiddenLayer 12from network_layers import LeNetConvPoolLayer 13from utility_functions import load_datamultilinear.py https://gitlab.com/pooja043/Globus_Docker_1 | Python | 329 lines
14from patsy import dmatrix 15import pandas as pd 16from statsmodels.api import OLS 16from statsmodels.api import OLS 17from statsmodels.api import stats 18import numpy as np 56 formula description of the model 57 dataframe : pandas.dataframe 58 dataframe where the model will be evaluated 87 ------- 88 summary : pandas.DataFrame 89 a dataframe containing an extract from the summary of the model 119 120 >>> import statsmodels.api as sm 121 >>> data = sm.datasets.longley.load_pandas()wide_n_deep_tutorial.py https://gitlab.com/github-cloud-corporation/tensorflow | Python | 212 lines
15"""Example code for TensorFlow Wide & Deep Tutorial using TF.Learn API.""" 16from __future__ import absolute_import 17from __future__ import division 17from __future__ import division 18from __future__ import print_function 19 19 20import tempfile 21import urllib 22 23import pandas as pd 24import tensorflow as tftest_indexing.py https://github.com/jseabold/pandas.git | Python | 289 lines
1import numpy as np 2import pytest 3 4import pandas as pd 5from pandas import Categorical, CategoricalIndex, Index, PeriodIndex, Series 5from pandas import Categorical, CategoricalIndex, Index, PeriodIndex, Series 6import pandas._testing as tm 7import pandas.core.common as com 7import pandas.core.common as com 8from pandas.tests.arrays.categorical.common import TestCategorical 9 252def test_mask_with_boolean_na_treated_as_false(index): 253 # https://github.com/pandas-dev/pandas/issues/31503 254 s = Series(range(3))zmethods.py https://gitlab.com/solstag/abstractology | Python | 253 lines
19 20import pandas 21from pathlib import Path 24 25from ..ioio import ioio 26 34 35and should return a pandas.Series of a scalar dtype and indexed by 'index'. 36""" 123 x_groups = xblocks[xlevel].groupby(xblocks[xlevel]) 124 count0 = pandas.Series(index=xblocks[xlevel].unique()) 125 count1 = pandas.Series(index=xblocks[xlevel].unique()) 239 240 values = pandas.Series(vals, index=pandas.MultiIndex.from_tuples(keys)) 241test_period.py https://github.com/neurodebian/pandas.git | Python | 251 lines
1import numpy as np 2 2 3import pandas as pd 4import pandas.util.testing as tm 4import pandas.util.testing as tm 5import pandas.core.indexes.period as period 6from pandas import Series, period_range, DataFrame, Perioddata_utils.py https://gitlab.com/lwd17/enhanced_examplar_ae | Python | 309 lines
7import csv 8import os 9import os.path as op 9import os.path as op 10import zipfile 11from functools import reduce 11from functools import reduce 12from glob import glob 13from multiprocessing import cpu_count 13from multiprocessing import cpu_count 14from typing import Any, Dict, List 15 16import numpy as np 17import pandas as pd 18import sentencepiece as sptest_categorical.py https://github.com/jreback/pandas.git | Python | 294 lines
4""" 5from io import StringIO 6import os 7 8import numpy as np 9import pytest 10 11from pandas.core.dtypes.dtypes import CategoricalDtype 12 12 13import pandas as pd 14from pandas import Categorical, DataFrame, Timestamp 14from pandas import Categorical, DataFrame, Timestamp 15import pandas._testing as tm 16test_inference.py https://github.com/pydata/pandas.git | Python | 524 lines
8 9from pandas._libs.tslibs.ccalendar import ( 10 DAYS, 12) 13from pandas._libs.tslibs.period import INVALID_FREQ_ERR_MSG 14from pandas.compat import is_platform_windows 15 16from pandas import ( 17 DatetimeIndex, 23) 24import pandas._testing as tm 25from pandas.core.arrays import ( 30 31import pandas.tseries.frequencies as frequencies 32import pandas.tseries.offsets as offsetspreprocessing.ipynb https://gitlab.com/aakansh9/SPHERE-Challenge | Jupyter | 188 lines
10 "source": [ 11 "import pandas as pd\n", 12 "import numpy as np" 128 "source": [ 129 "import xgboost" 130 ] 146 "\u001b[1;32m<ipython-input-54-4c763af0299c>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mxgboost\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mDMatrix\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mfeats\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mlabel\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mtargets\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", 147 "\u001b[1;32m/opt/conda/lib/python3.5/site-packages/xgboost-0.4-py3.5.egg/xgboost/core.py\u001b[0m in \u001b[0;36m__init__\u001b[1;34m(self, data, label, missing, weight, silent, feature_names, feature_types)\u001b[0m\n\u001b[0;32m 220\u001b[0m \u001b[0mfeature_names\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 221\u001b[0m feature_types)\n\u001b[1;32m--> 222\u001b[1;33m \u001b[0mlabel\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0m_maybe_pandas_label\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlabel\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 223\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 224\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mSTRING_TYPES\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", 148 "\u001b[1;32m/opt/conda/lib/python3.5/site-packages/xgboost-0.4-py3.5.egg/xgboost/core.py\u001b[0m in \u001b[0;36m_maybe_pandas_label\u001b[1;34m(label)\u001b[0m\n\u001b[0;32m 164\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlabel\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mDataFrame\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 165\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mlen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlabel\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m>\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 166\u001b[1;33m \u001b[1;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'DataFrame for label cannot have multiple columns'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 167\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 168\u001b[0m \u001b[0mlabel_dtypes\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mlabel\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdtypes\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",Command.java https://github.com/RS1999ent/hadoop-common.git | Java | 409 lines
19 20import java.io.FileNotFoundException; 21import java.io.IOException; 21import java.io.IOException; 22import java.io.PrintStream; 23import java.util.ArrayList; 23import java.util.ArrayList; 24import java.util.Arrays; 25import java.util.LinkedList; 25import java.util.LinkedList; 26import java.util.List; 27 27 28import org.apache.commons.logging.Log; 29import org.apache.commons.logging.LogFactory;test_callable.py https://github.com/neurodebian/pandas.git | Python | 267 lines
4import numpy as np 5import pandas as pd 6import pandas.util.testing as tm06 - Lesson.ipynb https://bitbucket.org/timoguin/learn-pandas.git | Jupyter | 382 lines
22 "input": [ 23 "# Import libraries\n", 24 "from pandas import DataFrame\n", 24 "from pandas import DataFrame\n", 25 "import pandas as pd" 26 ], 35 "input": [ 36 "print 'Pandas version: ' + pd.__version__" 37 ], 44 "text": [ 45 "Pandas version: 0.13.0\n" 46 ]google_image_scraper.py https://gitlab.com/Quantza/DeepClassificationBot | Python | 245 lines
5 6from __future__ import absolute_import 7from __future__ import print_function 7from __future__ import print_function 8import os 9import time 9import time 10import re 11import socket 12 13from selenium import webdriver 14from pattern.web import URL, DOM 95 def retrieve_source_fr_html(self, driver): 96 """ Make use of selenium. Retrieve from html table using pandas table. 97demo.py https://gitlab.com/yaojian/RenjuAI | Python | 177 lines
1# -*- coding: utf-8 -*- 2import os 3import sys 3import sys 4from datetime import datetime 5import numpy as np 5import numpy as np 6import pandas as pd 7 7 8import mail 9 38def prepare_basic_model(date_zone, file_format='pkl'): 39 from mail_preprocess import parallel_preprocess_v2 40 path_prefix = global_dir + "/2015-12-%s_token." + file_formatprep_mtedx_data.py https://gitlab.com/lwd17/enhanced_examplar_ae | Python | 271 lines
6 7import argparse 8import logging 8import logging 9import os 10from pathlib import Path 10from pathlib import Path 11import shutil 12from itertools import groupby 13from tempfile import NamedTemporaryFile 14from typing import Tuple 15 15 16import pandas as pd 17import soundfile as sftile.py https://gitlab.com/pooja043/Globus_Docker_4 | Python | 297 lines
4 5from pandas.core.api import DataFrame, Series 6from pandas.core.categorical import Categorical 7from pandas.core.index import _ensure_index 8import pandas.core.algorithms as algos 9import pandas.core.common as com 9import pandas.core.common as com 10import pandas.core.nanops as nanops 11from pandas.compat import zip 12 13import numpy as np 14fix.py https://gitlab.com/pooja043/Globus_Docker_4 | Python | 229 lines
1"""Supporting functions for the 'fix' command.""" 2from __future__ import absolute_import, division, print_function 3 3 4import logging 5 6import numpy as np 7import pandas as pd 8 8 9from . import params, smoothing 10prep_covost_data.py https://gitlab.com/lwd17/enhanced_examplar_ae | Python | 294 lines
7import argparse 8import csv 9import logging 9import logging 10import os 11import os.path as op 12import shutil 13from tempfile import NamedTemporaryFile 14from typing import Optional, Tuple 15 16import pandas as pd 17import torchaudio 17import torchaudio 18from examples.speech_to_text.data_utils import ( 19 create_zip,ioio.py https://gitlab.com/solstag/abstractology | Python | 310 lines
21import pickle 22import json 23import gzip 24import lzma 25import pandas 26from pathlib import Path 26from pathlib import Path 27from itertools import chain 28from tempfile import NamedTemporaryFile 55 "module": lzma, 56 "pandas_arg": "xz", 57 }, 272 @classmethod 273 def store_pandas(cls, obj, fpath, fmt=None, formatter_args={}): 274 """example_enhanced_boxplots.py https://gitlab.com/pooja043/Globus_Docker_4 | Python | 98 lines
1import numpy as np 2import matplotlib.pyplot as plt 3 4import statsmodels.api as sm 5 9 10data = sm.datasets.anes96.load_pandas() 11party_ID = np.arange(7)test_pytables.py https://github.com/bergtholdt/pandas.git | Python | 400 lines
1import nose 2import unittest 2import unittest 3import os 4import sys 5 6import numpy as np 7 7 8from pandas import (Series, DataFrame, Panel, LongPanel, DateRange, 9 MultiIndex) 10from pandas.io.pytables import HDFStore 11import pandas.util.testing as tm 12 13try: 14 import tables 15except ImportError:generate_baseline03.py https://gitlab.com/tianzhou2011/talkingdata | Python | 397 lines
8import keras 9import pandas as pd 10import os 10import os 11import sys 12import gc 12import gc 13from random import shuffle 14from scipy import sparse 16from sklearn.cross_validation import train_test_split 17from sklearn.metrics import log_loss 18 380 ################## 381 from sklearn.datasets import dump_svmlight_file 382 # Metricregression.py https://gitlab.com/SplatoonModdingHub/PTVS | Python | 303 lines
44 45from pandas import read_table 46import numpy as np 46import numpy as np 47import matplotlib.pyplot as plt 48 50 # [OPTIONAL] Seaborn makes plots nicer 51 import seaborn 52except ImportError: 63 # pandas.read_excel instead of read_table 64 #from pandas import read_excel 65 #frame = read_excel(URL) 131 # Normalize the entire data set 132 from sklearn.preprocessing import StandardScaler, MinMaxScaler 133 arr = MinMaxScaler().fit_transform(arr)ReverseTrainSecondLayer.py https://gitlab.com/hyeonjik420/deep_learning_transcriptomics | Python | 86 lines
1from keras.layers import Input, Dense, Activation 2import numpy as np 3from keras.models import Model, load_model 4from keras import optimizers, activations 5import math 6from numpy import * 7import pandas as pd 8from keras.callbacks import ModelCheckpoint 8from keras.callbacks import ModelCheckpoint 9from keras.callbacks import CSVLogger 10from keras import optimizers 10from keras import optimizers 11import tensorflow as tf 12from keras.backend import tensorflow_backend as K 12from keras.backend import tensorflow_backend as K 13import glob 14def sigmo(x):numeric.py https://github.com/hoffstein/pandas.git | Python | 393 lines
1import numpy as np 2import pandas.lib as lib 3import pandas.algos as _algos 3import pandas.algos as _algos 4import pandas.index as _index 5 6from pandas import compat 7from pandas.indexes.base import Index, InvalidIndexError 8from pandas.util.decorators import Appender, cache_readonly 8from pandas.util.decorators import Appender, cache_readonly 9import pandas.core.common as com 10from pandas.core.common import is_dtype_equal, isnull 10from pandas.core.common import is_dtype_equal, isnull 11import pandas.indexes.base as ibase 12test_ufunc.py https://github.com/jreback/pandas.git | Python | 304 lines
1from collections import deque 2import string 3 4import numpy as np 5import pytest 6 7import pandas as pd 8import pandas._testing as tm 8import pandas._testing as tm 9from pandas.arrays import SparseArray 10 181 a1, a2 = arrays_for_binary_ufunc 182 # work around https://github.com/pandas-dev/pandas/issues/26987 183 a1[a1 == 0] = 1 298def test_outer(): 299 # https://github.com/pandas-dev/pandas/issues/27186 300 s = pd.Series([1, 2, 3])goes.py https://github.com/ayshih/sunpy.git | Python | 317 lines
8import matplotlib.dates as mdates 9import matplotlib.ticker as mticker 10import numpy as np 10import numpy as np 11import packaging.version 12from matplotlib import pyplot as plt 12from matplotlib import pyplot as plt 13from pandas import DataFrame 14 18import sunpy.io 19from sunpy import log 20from sunpy.extern import parse 159 import sunpy.timeseries 160 import sunpy.data.sample 161 ts_goes = sunpy.timeseries.TimeSeries(sunpy.data.sample.GOES_XRS_TIMESERIES, source='XRS')FastFourierTransform.py https://gitlab.com/debasishk/PerformanceTest-Monitoring | Python | 328 lines
5import numpy as np 6import pandas as pd 7import matplotlib.pyplot as plt 8import datetime 9# from utils.mkdir import mkdir 10import os 41 out_path (str): The output path where results are stored 42 data (Pandas Dataframe): The input data where Outliers are to be found out 43 test_data (bool): Defaults to False. If model to be used for Unit Tests, explicitely specify this variable as True to bypass get_data() method. 79 Returns: 80 scores (Pandas DataFrame): FFT based outlier scores for each point stored in Pandas DataFrame indexed by tinestamp. 81 """ 113 Returns: 114 test_output (Pandas DataFrame): Pandas Dataframe object containing 1 column which holds scores for each point 115 """common.py https://github.com/neurodebian/pandas.git | Python | 279 lines
2 3import itertools 4from warnings import catch_warnings 4from warnings import catch_warnings 5import numpy as np 6 6 7from pandas.compat import lrange 8from pandas.core.dtypes.common import is_scalar 8from pandas.core.dtypes.common import is_scalar 9from pandas import Series, DataFrame, Panel, date_range, UInt64Index 10from pandas.util import testing as tm 10from pandas.util import testing as tm 11from pandas.io.formats.printing import pprint_thing 12test_multiclass.py https://gitlab.com/github-cloud-corporation/scikit-learn | Python | 347 lines
1 2from __future__ import division 3import numpy as np 3import numpy as np 4import scipy.sparse as sp 5from itertools import product 6 7from sklearn.externals.six.moves import xrange 8from sklearn.externals.six import iteritems 9 10from scipy.sparse import issparse 11from scipy.sparse import csc_matrix 11from scipy.sparse import csc_matrix 12from scipy.sparse import csr_matrix 13from scipy.sparse import coo_matrixTextAnalyzer.py https://gitlab.com/vicidroiddev/SouthParkMachineLearning | Python | 302 lines
6import logging 7import pandas 8import numpy as np 8import numpy as np 9import time 10import os 10import os 11import multiprocessing 12import matplotlib.pyplot as plt 19import sknn.mlp 20from sknn.backend import lasagne 21from sklearn.feature_extraction import DictVectorizer 248 249 output = pandas.DataFrame( 250 data={test_buyback_auth.py https://gitlab.com/lbennett/zipline | Python | 227 lines
3""" 4import blaze as bz 5from blaze.compute.core import swap_resources_into_scope 5from blaze.compute.core import swap_resources_into_scope 6import pandas as pd 7from six import iteritems 8 9from zipline.pipeline.common import( 10 BUYBACK_ANNOUNCEMENT_FIELD_NAME, 19) 20from zipline.pipeline.data import ( 21 CashBuybackAuthorizations, 23) 24from zipline.pipeline.factors.events import ( 25 BusinessDaysSinceCashBuybackAuth,tutorials.rst https://github.com/neurodebian/pandas.git | ReStructuredText | 181 lines
11 12pandas own :ref:`10 Minutes to pandas<10min>` 13 61 62- `01 - Lesson: <http://nbviewer.ipython.org/urls/bitbucket.org/hrojas/learn-pandas/raw/master/lessons/01%20-%20Lesson.ipynb>`_ 63 - Importing libraries 167 168- `Using Pandas and XlsxWriter to create Excel charts <https://pandas-xlsxwriter-charts.readthedocs.io/>`_ 169 176- `Financial analysis in python, by Thomas Wiecki <http://nbviewer.ipython.org/github/twiecki/financial-analysis-python-tutorial/blob/master/1.%20Pandas%20Basics.ipynb>`_ 177- `Intro to pandas data structures, by Greg Reda <http://www.gregreda.com/2013/10/26/intro-to-pandas-data-structures/>`_ 178- `Pandas and Python: Top 10, by Manish Amde <http://manishamde.github.io/blog/2013/03/07/pandas-and-python-top-10/>`_ 178- `Pandas and Python: Top 10, by Manish Amde <http://manishamde.github.io/blog/2013/03/07/pandas-and-python-top-10/>`_ 179- `Pandas Tutorial, by Mikhail Semeniuk <http://www.bearrelroll.com/2013/05/python-pandas-tutorial>`_ 180- `Pandas DataFrames Tutorial, by Karlijn Willems <http://www.datacamp.com/community/tutorials/pandas-tutorial-dataframe-python>`_indexing.py https://github.com/hoffstein/pandas.git | Python | 292 lines
1from vbench.benchmark import Benchmark 2from datetime import datetime 5 6common_setup = """from .pandas_vb_common import * 7""" 143try: 144 import pandas.computation.expressions as expr 145except: 161try: 162 import pandas.computation.expressions as expr 163except: 256n=100000 257mdt = pandas.DataFrame() 258mdt['A'] = np.random.choice(range(10000,45000,1000), n)sql.py https://github.com/rkabir/pandas.git | Python | 443 lines
4""" 5from datetime import datetime 6import numpy as np 6import numpy as np 7import traceback 8 8 9from numpy import NaN 10 10 11from pandas.core.datetools import format, to_datetime 12from pandas.core.api import DataFrame, Series, Index, isnull, pivot 144 def driver(self): 145 import pymssql 146 return pymssqlKalmanFilters.py https://gitlab.com/debasishk/PerformanceTest-Monitoring | Python | 310 lines
6import numpy as np 7from externals.pykalman import KalmanFilter 8import matplotlib.pyplot as plt 8import matplotlib.pyplot as plt 9import pandas as pd 10import datetime, platform, os 11from numpy.random import random 12from utils.mkdir import mkdir 13 23 out_path (str): The output path, to which specific path to be appended to save results 24 data (Pandas Dataframe): The data which needs to be fitted with ARIMA model. Defaults to Empty Dataframe 25 test_data (bool, Optional [Default False]): Defaults to False. If model to be used for Unit Tests, explicitely specify this variable as True to bypass get_data() method. 80 Args: 81 data (Pandas DataFrame): Input Dataset which needs to be smoothed out, and predicted values to be found 82vectorology.py https://gitlab.com/solstag/abstractology | Python | 259 lines
21 import gensim 22except ImportError: 23 print("Warning: Failed to import `gensim`, some functions may not be available") 24 25import multiprocessing, numpy, os, pandas 26from os import path 26from os import path 27from pathlib import Path 28from collections import OrderedDict 29from itertools import combinations 30from copy import deepcopy 31from matplotlib import pyplot as plt, colors as colors 32 33from .ioio import ioio 34from .corporalogy import CorporalogyOldVersionCopier.java https://bitbucket.org/cprenzberg/wildfly.git | Java | 239 lines
23 24import static org.junit.Assert.assertNotNull; 25import static org.junit.Assert.assertTrue; 26 27import java.io.BufferedInputStream; 28import java.io.BufferedOutputStream; 28import java.io.BufferedOutputStream; 29import java.io.BufferedReader; 30import java.io.BufferedWriter; 30import java.io.BufferedWriter; 31import java.io.File; 32import java.io.FileInputStream; 32import java.io.FileInputStream; 33import java.io.FileOutputStream; 34import java.io.FileReader;pivot.py https://github.com/smc77/pandas.git | Python | 291 lines
2 3from pandas import Series, DataFrame 4from pandas.tools.merge import concat 4from pandas.tools.merge import concat 5import pandas.core.common as com 6import numpy as np 6import numpy as np 7import types 8nanops.py https://github.com/smc77/pandas.git | Python | 382 lines
1import sys 2 2 3import numpy as np 4 5from pandas.core.common import isnull, notnull 6import pandas.core.common as com 7import pandas._tseries as lib 9try: 10 import bottleneck as bn 11 _USE_BOTTLENECK = True 11 _USE_BOTTLENECK = True 12except ImportError: # pragma: no cover 13 _USE_BOTTLENECK = False 128 and sys.version_info[0] >= 3): # pragma: no cover 129 import __builtin__ 130 if values.ndim > 1:test_merge_ordered.py https://github.com/neurodebian/pandas.git | Python | 90 lines
1import pandas as pd 2from pandas import DataFrame, merge_ordered 2from pandas import DataFrame, merge_ordered 3from pandas.util import testing as tm 4from pandas.util.testing import assert_frame_equal 5 6from numpy import nan 7api.py https://github.com/neurodebian/pandas.git | Python | 81 lines
9from pandas.core.categorical import Categorical 10from pandas.core.groupby import Grouper 11from pandas.io.formats.format import set_eng_float_format 11from pandas.io.formats.format import set_eng_float_format 12from pandas.core.index import (Index, CategoricalIndex, Int64Index, 13 UInt64Index, RangeIndex, Float64Index, 16 PeriodIndex, NaT) 17from pandas.core.indexes.period import Period, period_range, pnow 18from pandas.core.indexes.timedeltas import Timedelta, timedelta_range 24from pandas.core.panel import Panel, WidePanel 25from pandas.core.panel4d import Panel4D 26from pandas.core.reshape.reshape import ( 75 def __new__(cls, *args, **kwargs): 76 from pandas.core.resample import TimeGrouper 77 import warningstest_sorting.py https://github.com/jreback/pandas.git | Python | 284 lines
1import random 2 2 3import numpy as np 4import pytest 5 6from pandas.errors import PerformanceWarning, UnsortedIndexError 7 8from pandas import CategoricalIndex, DataFrame, Index, MultiIndex, RangeIndex 9import pandas._testing as tm 10from pandas.core.indexes.frozen import FrozenList 74 # these are the only two types that perform 75 # pandas compatibility input validation - the 76 # rest already perform separate (or no) such 121def test_unsortedindex_doc_examples(): 122 # https://pandas.pydata.org/pandas-docs/stable/advanced.html#sorting-a-multiindex 123 dfm = DataFrame(AUC_plot.py https://gitlab.com/BudzikFUW/budzik_analiza | Python | 228 lines
1 2import pandas as pd 3import numpy as np 4 5import scipy.stats as st 6import sys 6import sys 7import matplotlib.pyplot as plt 8import os 8import os 9import seaborn as sns 10from itertools import product 10from itertools import product 11from collections import defaultdict 12misc.py https://gitlab.com/pschuprikov/lpm | Python | 430 lines
1#!/usr/bin/env python3 2from textwrap import dedent 3import math 3import math 4from typing import List, Optional, Tuple, Union, Sequence, NamedTuple 5from sys import stderr 5from sys import stderr 6import os 7import os.path as path 9import click 10import pandas as pd 11import numpy as npRemoveUnnecessaryCastCodeFixProvider.vb https://gitlab.com/sharadag/Roslyn | Visual Basic | 194 lines
2 3Imports System.Collections.Immutable 4Imports System.Composition 4Imports System.Composition 5Imports System.Threading 6Imports Microsoft.CodeAnalysis.CodeActions 6Imports Microsoft.CodeAnalysis.CodeActions 7Imports Microsoft.CodeAnalysis.CodeFixes 8Imports Microsoft.CodeAnalysis.Diagnostics 8Imports Microsoft.CodeAnalysis.Diagnostics 9Imports Microsoft.CodeAnalysis.Formatting 10Imports Microsoft.CodeAnalysis.Simplification 10Imports Microsoft.CodeAnalysis.Simplification 11Imports Microsoft.CodeAnalysis.Text 12Imports Microsoft.CodeAnalysis.VisualBasic.Syntaxfactorplots.py https://gitlab.com/pooja043/Globus_Docker_4 | Python | 211 lines
26 x : array-like 27 The `x` factor levels constitute the x-axis. If a `pandas.Series` is 28 given its name will be used in `xlabel` if `xlabel` is None. 43 xlabel : str, optional 44 Label to use for `x`. Default is 'X'. If `x` is a `pandas.Series` it 45 will use the series names. 47 Label to use for `response`. Default is 'func of response'. If 48 `response` is a `pandas.Series` it will use the series names. 49 colors : list, optional 89 90 from pandas import DataFrame 91 fig, ax = utils.create_mpl_ax(ax) 183 """ 184 from pandas import Series 185 name = Nonetest_combine_concat.py https://github.com/neurodebian/pandas.git | Python | 311 lines
9import numpy as np 10import pandas as pd 11 11 12from pandas import Series, DataFrame, date_range, DatetimeIndex 13 13 14from pandas import compat 15from pandas.util.testing import assert_series_equal 15from pandas.util.testing import assert_series_equal 16import pandas.util.testing as tm 17 205 def test_combine_first_dt64(self): 206 from pandas.core.tools.datetimes import to_datetime 207 s0 = to_datetime(Series(["2010", np.NaN]))sampler.py https://gitlab.com/nexemjail/mir | Python | 223 lines
1import numpy as np 2import librosa 2import librosa 3import scipy 4import scipy.signal 4import scipy.signal 5from math import sqrt 6from math import log 6from math import log 7import scipy.signal.spectral 8 220 #t = time.time() 221 #df = pandas.DataFrame(convert_with_processes(path)) 222 #print time.time() - tPathData.java https://github.com/RS1999ent/hadoop-common.git | Java | 241 lines
20 21import java.io.File; 22import java.io.FileNotFoundException; 22import java.io.FileNotFoundException; 23import java.io.IOException; 24 24 25import org.apache.hadoop.classification.InterfaceAudience; 26import org.apache.hadoop.classification.InterfaceStability; 26import org.apache.hadoop.classification.InterfaceStability; 27import org.apache.hadoop.conf.Configuration; 28import org.apache.hadoop.fs.FileStatus; 28import org.apache.hadoop.fs.FileStatus; 29import org.apache.hadoop.fs.FileSystem; 30import org.apache.hadoop.fs.Path;pathology.py https://bitbucket.org/davidzhang/camda2013.git | Python | 242 lines
2 3from sklearn.svm import SVC 4from sklearn.ensemble import RandomForestClassifier 4from sklearn.ensemble import RandomForestClassifier 5from sklearn.cross_validation import KFold 6from sklearn.cross_validation import StratifiedKFold 7from sklearn.metrics import roc_curve, auc, precision_score, classification_report 8import pandas as pd 9import numpy as np 9import numpy as np 10from scipy import interp 11import os 11import os 12import pylab as pl 13test_misc_api.py https://github.com/hoffstein/pandas.git | Python | 343 lines
4import numpy as np 5import pandas as pd 6 6 7from pandas import Index, Series, DataFrame, date_range 8from pandas.tseries.index import Timestamp 9 10from pandas.compat import range 11from pandas import compat 11from pandas import compat 12import pandas.formats.printing as printing 13from pandas.util.testing import (assert_series_equal, 14 ensure_clean) 15import pandas.util.testing as tm 16install.rst https://github.com/hoffstein/pandas.git | ReStructuredText | 322 lines
156The commands in this table will install pandas for Python 2 from your distribution. 157To install pandas for Python 3 you may need to use the package ``python3-pandas``. 158 165 Debian & Ubuntu, unstable (latest packages), `NeuroDebian <http://neuro.debian.net/index.html#how-to-use-this-repository>`__ , ``sudo apt-get install python-pandas`` 166 Ubuntu, stable, `official Ubuntu repository <http://packages.ubuntu.com/search?keywords=pandas&searchon=names&suite=all§ion=all>`__ , ``sudo apt-get install python-pandas`` 167 Ubuntu, unstable (daily builds), `PythonXY PPA <https://code.launchpad.net/~pythonxy/+archive/pythonxy-devel>`__; activate by: ``sudo add-apt-repository ppa:pythonxy/pythonxy-devel && sudo apt-get update``, ``sudo apt-get install python-pandas`` 167 Ubuntu, unstable (daily builds), `PythonXY PPA <https://code.launchpad.net/~pythonxy/+archive/pythonxy-devel>`__; activate by: ``sudo add-apt-repository ppa:pythonxy/pythonxy-devel && sudo apt-get update``, ``sudo apt-get install python-pandas`` 168 OpenSuse & Fedora, stable, `OpenSuse Repository <http://software.opensuse.org/package/python-pandas?search_term=pandas>`__ , ``zypper in python-pandas`` 169 194 195 >>> import pandas as pd 196 >>> pd.test() 199 numpy version 1.10.2 200 pandas is installed in pandas 201 Python version 2.7.11 |Continuum Analytics, Inc.|answer_key.py https://gitlab.com/lbennett/zipline | Python | 341 lines
14# limitations under the License. 15import datetime 16import hashlib 16import hashlib 17import os 18 19import numpy as np 20import pandas as pd 21import pytz 21import pytz 22import xlrd 23import requests 24 25from six.moves import map 26daterange.py https://github.com/rkabir/pandas.git | Python | 490 lines
2 3from datetime import datetime 4import operator 5 6import numpy as np 7 8from pandas.core.index import Index 9import pandas.core.datetools as datetools 10 334 """ 335 import pytz 336 353 Generates a sequence of dates corresponding to the specified time 354 offset. Similar to dateutil.rrule except uses pandas DateOffset 355 objects to represent time incrementsUriTemplate.java https://github.com/gkamal/spring-framework.git | Java | 325 lines
18 19import java.io.Serializable; 20import java.io.UnsupportedEncodingException; 20import java.io.UnsupportedEncodingException; 21import java.net.URI; 22import java.net.URISyntaxException; 22import java.net.URISyntaxException; 23import java.util.Collections; 24import java.util.LinkedHashMap; 24import java.util.LinkedHashMap; 25import java.util.LinkedList; 26import java.util.List; 26import java.util.List; 27import java.util.Map; 28import java.util.regex.Matcher;controller.py https://gitlab.com/shpeely/game-stats | Python | 197 lines
1import logging 2import pandas as pd 3 3 4from game_stats.config import config 5from game_stats.store import StoreFactory 12 13from game_stats.statistics.ultimate_score import UltimateScore 14from game_stats.statistics.game_result_stats import GameResultStats 14from game_stats.statistics.game_result_stats import GameResultStats 15from game_stats.statistics.game_stats import GameStats 16from game_stats.statistics.player_stats import PlayerStats 16from game_stats.statistics.player_stats import PlayerStats 17from game_stats.constants import * 18external_data.py https://bitbucket.org/aabtzu/mlkaggle.git | Python | 267 lines
2 3import pandas 4import bs4 4import bs4 5import requests 6import urllib3 6import urllib3 7import os 8import datetime 8import datetime 9import argparse 10 25 """ 26 df_lines = pandas.read_csv(lines_file) 27 df_lines.Date = pandas.to_datetime(df_lines.Date).dt.datetest_form.py https://gitlab.com/braintech/psychopy-brain | Python | 194 lines
3 4from __future__ import division 5 5 6import os 7import pytest 7import pytest 8from pandas import DataFrame 9from psychopy.visual.window import Window 9from psychopy.visual.window import Window 10from psychopy.visual.form import Form 11from psychopy.visual.text import TextStim 11from psychopy.visual.text import TextStim 12from psychopy.visual.slider import Slider 13from psychopy import constantsplot_partial_dependence.py https://github.com/NelleV/scikit-learn.git | Python | 287 lines
45 46import pandas as pd 47from sklearn.datasets import fetch_california_housing 47from sklearn.datasets import fetch_california_housing 48from sklearn.model_selection import train_test_split 49 73 74from time import time 75from sklearn.pipeline import make_pipeline 95# 96# Importantly, this tabular dataset has very different dynamic ranges for its 97# features. Neural networks tend to be very sensitive to features with varying 103# 104# Note that it is important to check that the model is accurate enough on a 105# test set before plotting the partial dependence since there would be little__init__.py https://github.com/mblondel/scikit-learn.git | Python | 475 lines
3""" 4from collections import Sequence 5 5 6import numpy as np 7from scipy.sparse import issparse 7from scipy.sparse import issparse 8import warnings 9 9 10from .murmurhash import murmurhash3_32 11from .validation import (as_float_array, 15 check_symmetric) 16from .class_weight import compute_class_weight, compute_sample_weight 17from ..externals.joblib import cpu_count__init__.py https://gitlab.com/pooja043/Globus_Docker_4 | Python | 107 lines
1from __future__ import (absolute_import, division, print_function, 2 unicode_literals) 3 4import warnings 5from contextlib import contextmanager 6 7from matplotlib.cbook import is_string_like, iterable 8from matplotlib import rcParams, rcdefaults, use 15 16# stolen from pandas 17@contextmanager 26 27 >>> import warnings 28 >>> with assert_produces_warning(): 78 # it during all of the tests. 79 import locale 80 import warningsinterface.py https://github.com/smc77/pandas.git | Python | 134 lines
1from pandas.core.api import Series, DataFrame, Panel, MultiIndex 2from pandas.stats.ols import OLS, MovingOLS 3from pandas.stats.plm import PanelOLS, MovingPanelOLS, NonPooledPanelOLS 4import pandas.stats.common as common 5Exercises.ipynb https://gitlab.com/santosh.sivapurapu-ab/pandas_exercises | Jupyter | 179 lines
19 "\n", 20 "### Step 1. Import the necessary libraries" 21 ] 35 "source": [ 36 "### Step 2. Import the dataset from this [address](https://raw.githubusercontent.com/guipsamora/pandas_exercises/master/04_Apply/US_Crime_Rates/US_Crime_Rates_1960_2014.csv). " 37 ] 74 "source": [ 75 "##### Have you noticed that the type of Year is int64. But pandas has a different type to work with Time Series. Let's see it now.\n", 76 "\n",plot_and_correct_humidity095b.py https://gitlab.com/pkormos/phase_python | Python | 188 lines
9 10import netCDF4 as nc 11import numpy as np 12import matplotlib.pyplot as plt 13from pandas import Series, date_range 14 29p_list = [p_st.getncattr(tt_list[k]) for k in range(np.shape(pvar)[1])] # sorted rh station list 30ppt = Series(np.ma.filled(pvar[:,p_list.index(stn0)],np.nan).ravel(),index=date_range('1962-1-1', '2014-12-31 23:00', freq='H')) # make pandas dataset 31pn.close() 39r_list = [rh_st.getncattr(tt_list[k]) for k in range(np.shape(rvar)[1])] # sorted rh station list 40rh = Series(np.ma.filled(rvar[:,r_list.index(stn0)],np.nan).ravel(),index=date_range('18-Jun-1981 11:00:00', '01-Oct-2014', freq='H')) # make pandas dataset 41rn.close()common.py https://github.com/rkabir/pandas.git | Python | 353 lines
8from numpy.lib.format import read_array, write_array 9import numpy as np 10 10 11import pandas._tseries as _tseries 12 34 ''' 35 from pandas.core.generic import PandasObject 36 from pandas import Series 120def _default_index(n): 121 from pandas.core.index import NULL_INDEX 122 if n == 0: 141def _ensure_index(index_like): 142 from pandas.core.index import Index 143 if not isinstance(index_like, Index):Exercises.ipynb https://gitlab.com/santosh.sivapurapu-ab/pandas_exercises | Jupyter | 156 lines
17 "\n", 18 "### Step 1. Import the necessary libraries" 19 ] 33 "source": [ 34 "### Step 2. Import the first dataset [cars1](https://raw.githubusercontent.com/guipsamora/pandas_exercises/master/05_Merge/Auto_MPG/cars1.csv) and [cars2](https://raw.githubusercontent.com/guipsamora/pandas_exercises/master/05_Merge/Auto_MPG/cars2.csv). " 35 ]misc.py https://github.com/hoffstein/pandas.git | Python | 389 lines
1from numpy import NaN 2from pandas import compat 3import numpy as np 4 5from pandas.core.api import Series, DataFrame 6from pandas.core.series import remove_na 7from pandas.compat import zip, lrange 8import pandas.core.common as com 9ConcurrentTransactionAwareProxyTests.java https://github.com/iboyko/spring-batch.git | Java | 279 lines
18 19import static org.junit.Assert.assertEquals; 20import static org.junit.Assert.assertFalse; 20import static org.junit.Assert.assertFalse; 21import static org.junit.Assert.assertTrue; 22import static org.junit.Assert.fail; 23 24import java.util.ArrayList; 25import java.util.HashMap; 25import java.util.HashMap; 26import java.util.List; 27import java.util.Map; 27import java.util.Map; 28import java.util.Set; 29import java.util.concurrent.Callable;test_indexing.py https://github.com/pydata/pandas.git | Python | 360 lines
1from datetime import ( 2 datetime, 4) 5import re 6 6 7import numpy as np 8import pytest 9 10from pandas import ( 11 Index, 20) 21import pandas._testing as tm 22retrieve_features.py https://gitlab.com/genehack-2/15a.ozerov.team_untitled | Python | 288 lines
1import cv2 2import numpy as np 3from matplotlib import pyplot as plt 4import pandas as pd 5import seaborn as sns 5import seaborn as sns 6import sys 7HOME_DIR = '/Users/agalicina/Term10/genehack/' ##change for your machine 8sys.path.append(HOME_DIR+'genehack2016') 9from process import * 10from sklearn.metrics import roc_curve, auc 10from sklearn.metrics import roc_curve, auc 11import math 12hashing.py https://github.com/neurodebian/pandas.git | Python | 332 lines
6import numpy as np 7from pandas._libs import hashing, tslib 8from pandas.core.dtypes.generic import ( 12 ABCDataFrame) 13from pandas.core.dtypes.common import ( 14 is_categorical_dtype, is_list_like) 14 is_categorical_dtype, is_list_like) 15from pandas.core.dtypes.missing import isna 16from pandas.core.dtypes.cast import infer_dtype_from_scalar 75 """ 76 from pandas import Series 77 if hash_key is None: 284 if categorize: 285 from pandas import factorize, Categorical, Index 286 codes, categories = factorize(vals, sort=False)DynamicPricingAlgo .ipynb https://gitlab.com/thiagarajan.saravanan/dynamic-pricer | Jupyter | 496 lines
23 "import numpy as np\n", 24 "import pandas as pd\n", 25 "data = pd.ExcelFile(\"Breakfast.xlsx\")\n", 171 "Method 1\n", 172 "import pandas as pd\n", 173 "from pymongo import MongoClient\n", 210 "import pymongo\n", 211 "import pandas as pd\n", 212 "from pymongo import Connection\n", 220 "import numpy as np\n", 221 "import pandas as pd\n", 222 "\n", 242 "import pymongo\n", 243 "import pandas as pd\n", 244 "#from pymongo import Connection\n",testing.pyx https://github.com/neurodebian/pandas.git | Cython | 213 lines
2 3from pandas import compat 4from pandas.core.dtypes.missing import isna, array_equivalent 4from pandas.core.dtypes.missing import isna, array_equivalent 5from pandas.core.dtypes.common import is_dtype_equal 6 120 if not isiterable(b): 121 from pandas.util.testing import assert_class_equal 122 # classes can't be the same, to raise error 131 if a.shape != b.shape: 132 from pandas.util.testing import raise_assert_detail 133 raise_assert_detail( 137 if check_dtype and not is_dtype_equal(a, b): 138 from pandas.util.testing import assert_attr_equal 139 assert_attr_equal('dtype', a, b, obj=obj)timedeltas.py https://github.com/neurodebian/pandas.git | Python | 191 lines
5import numpy as np 6import pandas as pd 7import pandas._libs.tslib as tslib 8 9from pandas.core.dtypes.common import ( 10 _ensure_object, 13 is_list_like) 14from pandas.core.dtypes.generic import ABCSeries, ABCIndexClass 15 78 elif isinstance(arg, ABCSeries): 79 from pandas import Series 80 values = _convert_listlike(arg._values, unit=unit, 188 if box: 189 from pandas import TimedeltaIndex 190 value = TimedeltaIndex(value, unit='ns', name=name)Multithreaded_server.py https://gitlab.com/Angiolillo/SOKE | Python | 348 lines
1from server import Clustering_dirichlet 2from sklearn.naive_bayes import MultinomialNB 3import numpy as np 4import pandas as pd 5import pickle 5import pickle 6from server import Preprocessing 7import threading 7import threading 8import socket 9test_period.py https://github.com/jreback/pandas.git | Python | 449 lines
5from pandas._libs.tslibs.period import IncompatibleFrequency 6import pandas.util._test_decorators as td 7 7 8from pandas.core.dtypes.base import registry 9from pandas.core.dtypes.dtypes import PeriodDtype 11import pandas as pd 12import pandas._testing as tm 13from pandas.core.arrays import PeriodArray, period_array 50def test_period_array_readonly_object(): 51 # https://github.com/pandas-dev/pandas/issues/25403 52 pa = period_array([pd.Period("2019-01-01")]) 399 400 from pandas.core.arrays._arrow_utils import ArrowPeriodType 401dedup_columns.py https://gitlab.com/mbay/bosch | Python | 97 lines
1from subprocess import Popen, PIPE 2import pandas as pd 3import numpy as np 3import numpy as np 4import argparse 5import time 5import time 6from scipy.sparse import csr_matrix 7from sklearn import preprocessingcell.py https://gitlab.com/abhi1tb/build | Python | 330 lines
12 13# Python stdlib imports 14from copy import copy 14from copy import copy 15import datetime 16import re 18 19from openpyxl.compat import ( 20 NUMERIC_TYPES, 23 24from openpyxl.utils.exceptions import IllegalCharacterError 25 40try: 41 from pandas import Timestamp 42 TIME_TYPES = TIME_TYPES + (Timestamp,)test_alter_axes.py https://github.com/neurodebian/pandas.git | Python | 280 lines
3 4import pytest 5 8import numpy as np 9import pandas as pd 10 10 11from pandas import Index, Series 12from pandas.core.index import MultiIndex, RangeIndex 13 14from pandas.compat import lrange, range, zip 15from pandas.util.testing import assert_series_equal, assert_frame_equal 15from pandas.util.testing import assert_series_equal, assert_frame_equal 16import pandas.util.testing as tm 172015_10_26_Distance_effects.ipynb https://gitlab.com/jdebelius/Absloute-Power | Jupyter | 527 lines
19 "source": [ 20 "import numpy as np\n", 21 "import matplotlib.pyplot as plt\n", 22 "import scipy\n", 23 "import pandas as pd\n", 24 "import skbio\n", 25 "\n", 26 "import absloute_power.distance as dist" 27 ]misc.py https://gitlab.com/pooja043/Globus_Docker_4 | Python | 386 lines
1from numpy import NaN 2from pandas import compat 3import numpy as np 4 5from pandas.core.api import Series, DataFrame, isnull, notnull 6from pandas.core.series import remove_na 6from pandas.core.series import remove_na 7from pandas.compat import zip 8test_common.py https://github.com/rkabir/pandas.git | Python | 129 lines
1from pandas import Series, DataFrame 2from pandas.core.common import notnull, isnull 2from pandas.core.common import notnull, isnull 3import pandas.core.common as common 4import pandas.util.testing as tm 5 6import numpy as np 7 125if __name__ == '__main__': 126 import nose 127 nose.runmodule(argv=[__file__,'-vvs','-x','--pdb', '--pdb-failure'],engine.py https://gitlab.com/debasishk/PerformanceTest-Monitoring | Python | 274 lines
1from dataprep import DataPreparation 2from model_aggregators import ModelAggregation 3from modify_scores import ModifyScores 4import pandas as pd 5from config import * 5from config import * 6from multiprocessing import Process, Manager 7import warnings 7import warnings 8from utils.dbCon import connect_db 9 11 12# import sys 13# out_file = open("output.txt", "a+")test_index.py https://github.com/pydata/pandas.git | Python | 389 lines
1import numpy as np 2import pytest 3 4from pandas.errors import PerformanceWarning 5 5 6import pandas as pd 7from pandas import ( 13) 14import pandas._testing as tm 15 242 # GH 9967 243 from copy import deepcopy 244test_foreign.py https://gitlab.com/pooja043/Globus_Docker_4 | Python | 199 lines
4import os 5import warnings 6from datetime import datetime 10from pandas import DataFrame, isnull 11import pandas.util.testing as ptesting 12 19 20import pandas 21pandas_old = int(pandas.__version__.split('.')[1]) < 9 43def test_genfromdta_pandas(): 44 from pandas.util.testing import assert_frame_equal 45 dta = macrodata.load_pandas().data 196if __name__ == "__main__": 197 import nose 198 nose.runmodule(argv=[__file__,'-vvs','-x','--pdb'],homework2_correction.ipynb https://gitlab.com/gvallverdu/cours-python | Jupyter | 341 lines
21 "* Read the file by yourself by browsing it line by line\n", 22 "* Use the read_csv() function of the pandas module to read the table.\n", 23 "\n", 154 "source": [ 155 "## Part 2: read in the file with pandas\n", 156 "\n", 156 "\n", 157 "First, you have to import the pandas module:" 158 ] 165 "source": [ 166 "import pandas as pd" 167 ] 172 "source": [ 173 "We now use pandas' [`read_csv()`](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_csv.html) function to read the file. Here are the elements we have to control to read the :\n", 174 "\n",pandas-0.19.1-seqf.patch https://gitlab.com/argent/portage | Patch | 357 lines
44 from dateutil.relativedelta import relativedelta 45 from pandas.compat import range, iteritems 46@@ -4851,6 +4852,7 @@ class TestDST(tm.TestCase): 213 else: 214diff --git a/pandas/tslib.pyx b/pandas/tslib.pyx 215index d4eaaa0b5..685de214c 100644 242@@ -412,17 +413,7 @@ class Timestamp(_Timestamp): 243 from pandas.tseries.frequencies import to_offset 244 freq = to_offset(freq) 296+ # setup components 297+ pandas_datetime_to_datetimestruct(value, PANDAS_FR_ns, &dts) 298+ dts.ps = self.nanosecond * 1000 329+ # reconstruct & check bounds 330+ value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) 331+ if value != NPY_NAT:test_nth.py https://github.com/neurodebian/pandas.git | Python | 253 lines
1import numpy as np 2import pandas as pd 3from pandas import DataFrame, MultiIndex, Index, Series, isna 3from pandas import DataFrame, MultiIndex, Index, Series, isna 4from pandas.compat import lrange 5from pandas.util.testing import ( 9 10from .common import MixIn 11tabular_comparison.ipynb https://gitlab.com/rldotai/td-variance | Jupyter | 439 lines
10 "source": [ 11 "import numpy as np\n", 12 "from numpy.linalg import pinv\n", 13 "\n", 14 "import pandas as pd\n", 15 "\n", 15 "\n", 16 "import networkx as nx\n", 17 "import pydot\n", 17 "import pydot\n", 18 "from IPython.display import Image, display\n", 19 "\n", 19 "\n", 20 "import matplotlib.pyplot as plt\n", 21 "%matplotlib inline\n",hdfstore_bench.py https://github.com/hoffstein/pandas.git | Python | 278 lines
1from vbench.api import Benchmark 2from datetime import datetime 5 6common_setup = """from .pandas_vb_common import * 7import ostest_interval.py https://github.com/neurodebian/pandas.git | Python | 261 lines
1import pytest 2import numpy as np 2import numpy as np 3import pandas as pd 4 4 5from pandas import Series, DataFrame, IntervalIndex, Interval 6from pandas.compat import product 6from pandas.compat import product 7import pandas.util.testing as tm 8pkl_utils.py https://github.com/lamblin/Theano.git | Python | 405 lines
6""" 7from __future__ import absolute_import, print_function, division 8import numpy as np 12import tempfile 13import zipfile 14import warnings 19try: 20 from pickle import DEFAULT_PROTOCOL 21except ImportError: 23 24import theano 25from theano import config 83# python 2. 84# This code is taken from Pandas, https://github.com/pydata/pandas, 85# under the same 3-clause BSD license.generate_e4.py https://gitlab.com/tianzhou2011/talkingdata | Python | 213 lines
1#!/usr/bin/env python 2from __future__ import division 3from scipy import sparse 3from scipy import sparse 4from sklearn.datasets import dump_svmlight_file 5from sklearn.preprocessing import LabelEncoder, OneHotEncoder 5from sklearn.preprocessing import LabelEncoder, OneHotEncoder 6import argparse 7import logging 7import logging 8import numpy as np 9import os 9import os 10import pandas as pd 11import timejoin.pyx https://github.com/neurodebian/pandas.git | Cython | 267 lines
2 3cimport numpy as np 4import numpy as np 5 6cimport cython 7from cython cimport Py_ssize_t 8 9np.import_array() 10 10 11from numpy cimport (ndarray, 12 int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, 17 18from pandas._libs.algos import groupsort_indexer, ensure_platform_int 19from pandas.core.algorithms import take_nd