import numpy as np import pandas as pd print("Hello World!") # initialize list of lists data = [['tom', 10], ['nick', 15], ['juli', 14]] # Create the pandas DataFrame df = pd.DataFrame(data, columns = ['Name', 'Age']) print(df) df2 = pd.DataFrame(np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), columns=['a', 'b', 'c']) # print dataframe. print(df2)
- import numpy as np
- import pandas as pd
- print("Hello World!")
- # initialize list of lists
- data = [['tom', 10], ['nick', 15], ['juli', 14]]
- # Create the pandas DataFrame
- df = pd.DataFrame(data, columns = ['Name', 'Age'])
- print(df)
- df2 = pd.DataFrame(np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]),
- columns=['a', 'b', 'c'])
- # print dataframe.
- print(df2)
import numpy as np print("Hello World!")
from random import choice_0 = "hello world!"greet = lambda: choice((*globals().values(),))- import numpy as np
- print("Hello World!")
import codewars_test as test # TODO Write tests import solution # or from solution import example # test.assert_equals(actual, expected, [optional] message) @test.describe("Example") def test_group(): @test.it("test case") def test_case(): test.assert_equals(1 + 1, 2)
- import codewars_test as test
- # TODO Write tests
- import solution # or from solution import example
- # test.assert_equals(actual, expected, [optional] message)
- @test.describe("Example")
- def test_group():
- @test.it("test case")
- def test_case():
test.assert_equals(solution.greet(), "hello world!")- test.assert_equals(1 + 1, 2)