question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE] Implicit column for dataframe API

See original GitHub issue

Is your feature request related to a problem? Please describe. I find it very redundant and unnecessary to repeat typing a column reference for api functions that act on a single column dataframe.

Describe the solution you’d like Implicitly determine the column for functions that are applied to dataframes with only one column. This could easily be done by checking length of [...this[__columns__]]. This would be particularly useful for df.toArray() since currently using it on a single column returns an array of single element arrays which I can’t see any use case for. That said, I believe many other functions can be served from this feature and it will also reduce a lot of repetition.

Describe alternatives you’ve considered Perhaps a new Series object similar to pandas library.

Additional context N/A

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
Gmoussecommented, Jul 10, 2019

Hi @mbkupfer, I m currently working on it, I will submit (in this issue) a proposal about the api.

2reactions
Gmoussecommented, May 3, 2019

Hi that’s a good point. I will see what could be done ! Thank you for your suggestion

Read more comments on GitHub >

github_iconTop Results From Across the Web

Class DataFrame - Apache Spark
A distributed collection of data organized into named columns. A DataFrame is equivalent to a relational table in Spark SQL. The following example...
Read more >
A practical introduction to Spark's Column- part 1 - Medium
A table in Spark SQL. Frequently used simple, important and common column methods for effective dataframe/dataset manipulation.
Read more >
How implicitly determine dataframe column type in python ...
1 Answer 1 ; cast_df(df): ; for column in ; if df[column].dtype != np.object ; break column_types = df[column].apply(lambda ; type(ast.literal_eval(x))) ...
Read more >
Essential basic functionality — pandas 1.5.2 documentation
Passing multiple functions will yield a column MultiIndexed DataFrame. The first level will be the original frame column names; the second level will...
Read more >
PySpark Select Columns From DataFrame
You can select the single or multiple columns of the DataFrame by passing the column names you wanted to select to the select()...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found