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.

How to rename the Dataframe columns in CAPS

See original GitHub issue

I need to rename some of my data-frame columns in CAPS.

i found that it’s possible in spark using alias method, but in order to use it i need to import spark.implicit.

this import dosen’t work in your project, what is it’s equivalent ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Mats-SXcommented, Sep 3, 2018

@HADDADENICAR You have to add that line after introducing the spark variable. That is, after row 45.

https://stackoverflow.com/questions/10537277/what-does-this-import-exactly-mean-in-scala

0reactions
HADDADENICARcommented, Aug 31, 2018

@Mats-SX in DataFrameInputExample when i add import spark.implicits._ i get an error telling “Cannot resolve symbol spark”

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Change Pandas Column Names to Lower Case
More compact way to change a data frame's column names to lower case is to use Pandas rename() function. Here we specify columns...
Read more >
How can I make pandas dataframe column headers all ...
You can do it like this: data.columns = map(str.lower, data.columns). or data.columns = [x.lower() for x in data.columns]. example: >>> data = pd....
Read more >
Convert Column Names to Uppercase in Pandas Dataframe
Convert Column Names to Uppercase using str.upper() ... where, df is the input dataframe and columns is the attribute to get the column...
Read more >
Capitalize Column Names in a Dataframe
To capitalize the column names, we can simply invoke the upper() method on the Index object in which the column names are stored....
Read more >
Pandas - Change Column Names to Uppercase
Use .str.upper() method to change the column names (of all the columns) to uppercase. · If you want only want to change the...
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