Skip to content
#

dataframe

Here are 550 public repositories matching this topic...

alexander-beedie
alexander-beedie commented Dec 12, 2021

Versions

Python 3.9 / Polars 0.10.27 / Windows 10

Describe your bug / reproduce behaviour

>>> # create trivial float series and observe the resulting repr
>>> import polars as pl
>>> pl.from_records( data=[1.0, 0.0, -1.0], columns=['test'] )

shape: (3, 1)
┌──────┐
│ test │
│ ---  │
│ f64  │
╞══════╡
│ 1# <- integer repr
├╌╌╌╌╌╌┤
│ 0.0# <- fl
zhemaituk
zhemaituk commented Dec 16, 2021

pandas-ta: 0.3.14b0

Running df.ta.strategy() or more specifically df.ta.jma() on a simple dataframe fails with

Error
Traceback (most recent call last):
  File "/Users/andrei/Projects/BE/breakingequity/breakingequity-backtest-single-day/tests/test_ohlcdata.py", line 60, in test_jma
    df.ta.jma()
  File "/Users/andrei/.local/share/virtualenvs/breakingequity-backtest-single-day
danfojs
goodPointP
goodPointP commented Nov 22, 2021

It would be really useful if there was a method that could insert a column into an existing Dataframe between two existing columns. I know about .addColumn, but that seems to place the new column at the end of the Dataframe.

For example:

df.print()

A | B 
======
7 | 5
3 | 6

df.insert({ "afterColumn": "A", "newColumnName": "C", "data": [4,1], inplace: true })
df.print()

tv
DataFrame
anks7190
anks7190 commented Jan 27, 2021

Hi ,

I am using some basic functions from pyjanitor such as - clean_names() , collapse_levels() in one of my code which I want to productionise.
And there are limitations on the size of the production code base.
Currently ,if I just look at the requirements.txt for just "pyjanitor" , its huge .
I don't think I require all the dependencies in my code.
How can I remove the unnecessary ones ?

pdpipe
yarkhinephyo
yarkhinephyo commented Nov 28, 2021

For pipeline stages provided by the pdpipe.basic_stages, supplying conditions to the prec and post keyword arguments may not return the correct error messages.

Example Code

import pandas as pd; import pdpipe as pdp;
df = pd.DataFrame([[1,4],[4,5],[1,11]], [1,2,3], ['a','b'])
pline = pdp.PdPipeline([
  pdp.FreqDrop(2, 'a', prec=pdp.cond.HasAllColumns(['x']))
])
pline.apply(

Improve this page

Add a description, image, and links to the dataframe topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the dataframe topic, visit your repo's landing page and select "manage topics."

Learn more