본문 바로가기

Python

pytagcloud 0.3.5 pytagcloud: Create beautiful tag clouds as images or HTML from pytagcloud import create_tag_image, make_tags from pytagcloud.lang.counter import get_tag_counts YOUR_TEXT = "A tag cloud is a visual representation for text data, typically\ used to depict keyword metadata on websites, or to visualize free form text." tags = make_tags(get_tag_counts(YOUR_TEXT), maxsize=120) create_tag_image(tags, 'c.. 더보기
scipy.ndimage.filters.gaussian_filter1d scipy.ndimage.filters.gaussian_filter1d: One-dimensional Gaussian filter. scipy.ndimage.filters.gaussian_filter1d(input, sigma, axis=-1, order=0, output=None, mode='reflect', cval=0.0, truncate=4.0) [References] http://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.filters.gaussian_filter1d.html 더보기
scipy.signal.argrelextrema scipy.signal.argrelextrema: Calculate the relative extrema of data.scipy.signal.argrelextrema(data, comparator, axis=0, order=1, mode='clip') [References] http://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.argrelextrema.html 더보기
scipy.signal.find_peaks_cwt scipy.signal.find_peaks_cwt: Attempt to find the peaks in a 1-D array.The general approach is to smooth vector by convolving it with wavelet(width) for each width in widths. Relative maxima which appear at enough length scales, and with sufficiently high SNR, are accepted. scipy.signal.find_peaks_cwt(vector, widths, wavelet=None, max_distances=None, gap_thresh=None, min_length=None, min_snr=1, n.. 더보기
nltk.tag.pos_tag(tokens) Use NLTK’s currently recommended part of speech tagger to tag the given list of tokens. >>> from nltk.tag import pos_tag >>> from nltk.tokenize import word_tokenize >>> pos_tag(word_tokenize("John's big idea isn't all that bad.")) [('John', 'NNP'), ("'s", 'POS'), ('big', 'JJ'), ('idea', 'NN'), ('is', 'VBZ'), ("n't", 'RB'), ('all', 'DT'), ('that', 'DT'), ('bad', 'JJ'), ('.', '.')] Alphabetical li.. 더보기
pandas.read_csv pandas.read._csv: Read CSV (comma-separated) file into DataFrame. Also supports optionally iterating or breaking of the file into chunks. pandas.io.parsers.read_csv(filepath_or_buffer, sep=', ', dialect=None, compression=None, doublequote=True, escapechar=None, quotechar='"', quoting=0, skipinitialspace=False, lineterminator=None, header='infer', index_col=None, names=None, prefix=None, skiprows.. 더보기
numpy.loadtxt vs. numpy.genfromtxt numpy.loadtxt: Load data from a text file. Each row in the text file must have the same number of values. numpy.loadtxt(fname, dtype=, comments='#', delimiter=None, converters=None, skiprows=0, usecols=None, unpack=False, ndmin=0) numpy.genfromtxt: Load data with missing values handled as specified. numpy.genfromtxt(fname, dtype=, comments='#', delimiter=None, skiprows=0, skip_header=0, skip_foo.. 더보기