Index.to_frame() seems not working properly.
See original GitHub issue>>> kdf = ks.DataFrame({"Koalas": [1, 2, 3]}, index=pd.Index([1, 2, 3]))
>>> kdf["NEW"] = ks.Series([100, 200, 300])
>>> kdf
0 NEW
1 1 200.0
3 3 NaN
2 2 300.0
The above code is working well.
But the same shape of DataFrame which is made from Index.to_frame() seems not work properly.
>>> kdf = ks.Index([1, 2, 3]).to_frame(name="Koalas")
>>> kdf["NEW"] = ks.Series([100, 200, 300])
>>> kdf
Traceback (most recent call last):
...
pyspark.sql.utils.AnalysisException: Reference 'Koalas' is ambiguous, could be: Koalas, Koalas.;
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Data frame indexing not working as it should be. Does not ...
When the migration is complete, you will access your Teams at stackoverflowteams.com, and they will no longer appear in the left sidebar on ......
Read more >pandas.Index.to_frame — pandas 1.5.2 documentation
Create a DataFrame with a column containing the Index. Parameters. indexbool, default True. Set the index of the returned DataFrame as the original...
Read more >The Craft of Research, 2nd edition (Chicago Guides to Writing ...
Research is hard work, but like any challenging job done well, both the process and the results can bring real personal satisfac- tion....
Read more >Defining Index or Table of Contents Entries - LibreOffice Help
Choose Insert - Table of Contents and Index - Index Entry, and do one of the following: To change the text that appears...
Read more >Downloads - ChromeDriver - WebDriver for Chrome
... Chromedriver 86 - chromedriver .quit() doesn't seem to pass unload event properly; Resolved issue 3649: Copying selected text to clipboard does not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
InternalFrame
doesn’t work only withspark_frame
but with all the metadata. Thedata_spark_columns
contains all the changes since the last timespark_frame
is created.Even if
spark_frame
shows the values of[1, 2, 3]
,data_spark_columns
has the operation ofkser.where(kser < 2)
.We always use both to show the actual values.
Close since this is resolved.