<jupyter_start><jupyter_text>CURSO DE ANÁLISE DE DADOS COM PYTHON - CERTIRAFAEL CALIXTODATAFRAMES<jupyter_code>from pandas import DataFrame, read_csv, to_datetime
df = read_csv("XRPBTC.csv")
df.set_index("Date", inplace=True)
df.index = to_datetime(df.index)
df.head(5)
df.tail(5)
df[["High","Low","Ask"]].head(5)
df.corr()
resampled_df = df["Low"].resample("A").ohlc()
resampled_df.head(10)
help(df.resample)<jupyter_output>Help on method resample in module pandas.core.generic:

resample(rule, how=None, axis=0, fill_method=None, closed=None, label=None, convention='start', kind=None, loffset=None, limit=None, base=0, on=None, level=None) method of pandas.core.frame.DataFrame instance
    Resample time-series data.
    
    Convenience method for frequency conversion and resampling of time
    series. Object must have a datetime-like index (`DatetimeIndex`,
    `PeriodIndex`, or `TimedeltaIndex`), or pass datetime-like values
    to the `on` or `level` keyword.
    
    Parameters
    ----------
    rule : str
        The offset string or object representing target conversion.
    how : str
        Method for down/re-sampling, default to 'mean' for downsampling.
    
        .. deprecated:: 0.18.0
           The new syntax is ``.resample(...).mean()``, or
           ``.resample(...).apply(<func>)``
    axis : {0 or 'index', 1 or 'columns'}, default 0
        Which axis to use for up- or down-sampling. For [...]
{'fraction_non_alphanumeric': 0.13846153846153847, 'fraction_numerical': 0.009790209790209791, 'mean_word_length': 3.6161290322580646, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '306866', 'license': 'MIT', 'n_tokens_mistral': 488, 'n_tokens_neox': 470, 'n_words': 132, 'path': 'ex_3/pandas_ex.ipynb', 'repo_name': 'rafaelcalixto/analise-de-dados-com-python', 'size': '1430'}